三维重建16:概率图模型 模板类编程
剛刷了一部分網(wǎng)絡(luò)題,又出了個模板類編程。沒人能從面試中得到自己想要的方法,只能得到能看得到的結(jié)果!!!
一 概率圖模型
???? 貝葉斯模型,真是推導(dǎo)不出來了!貝葉斯函數(shù)貌似也寫不出來了!
???? 參考:斯坦福概率圖模型-貝葉斯網(wǎng)絡(luò) -https://blog.csdn.net/wishchin/article/details/14136257
???? 貝葉斯網(wǎng)絡(luò),是一個有向無環(huán)圖的網(wǎng)絡(luò),其中節(jié)點表示的是隨機變量,可以是觀測變量、隱性變量或者參數(shù)等。
??? 馬爾科夫性,來源于自動化領(lǐng)域隨機過程的概念。馬爾科夫決策過程(Markov Decision Process),動態(tài)規(guī)劃(Dynamic Programming)的基礎(chǔ)都是馬爾科夫性質(zhì)/無后效性。
??? 簡言之,*未來與過去無關(guān),只和現(xiàn)在有關(guān) *
? ? 即: P ( X n + 1 ∣ X 0 , . . . , X n ) = P ( X n + 1 ∣ X n ) P({X_{n+1}|X_0, . . . , X_n}) = P({X_{n+1}|X_n} ) P(Xn+1?∣X0?,...,Xn?)=P(Xn+1?∣Xn?),
???? HMM網(wǎng)絡(luò),隱馬爾科夫網(wǎng)絡(luò)。是一種結(jié)構(gòu)最簡單的動態(tài)貝葉斯網(wǎng)的生成模型,為馬爾科夫網(wǎng)絡(luò)添加一個隱層,參考:HMM模型,訓(xùn)練算法有前向,后向,以及著名的維比特算法。
???? CRF,條件隨機場,是遵循馬爾科夫性的概率圖網(wǎng)絡(luò),是一個典型的有向圖網(wǎng)絡(luò),CRF是一個判別式模型。
???? HMM模型訓(xùn)練最終會收斂到一個穩(wěn)定的轉(zhuǎn)移矩陣。CRF模型用于圖像分割,即(CRF)用于pixel-wise的圖像標(biāo)記。最小化CRF圖像標(biāo)記gIbbs能量得到的勢函數(shù),即完成最優(yōu)分割的過程。
???????????????
???? 參考:ANN-生成式模型-https://blog.csdn.net/wishchin/article/details/45101251
???? 參考:Time Analsisy HMM-model :https://blog.csdn.net/wishchin/article/details/51594271
???? 參考:從感知機到深度網(wǎng)絡(luò)-https://blog.csdn.net/wishchin/article/details/45067177
???? 參考:神經(jīng)網(wǎng)絡(luò)進行降維--https://blog.csdn.net/wishchin/article/details/45287125
???? CRF模型作為經(jīng)典的傳統(tǒng)分割方法,曾得到廣泛的應(yīng)用。在DeepLab中也使用了CRF方法作為精細調(diào)整。
? ?? 生成式模型是06年深度學(xué)習(xí)的討論基礎(chǔ),通過大量數(shù)據(jù)預(yù)訓(xùn)練,學(xué)習(xí)出波爾茲曼機參數(shù),得到的生成結(jié)構(gòu),是結(jié)構(gòu)學(xué)習(xí)的基礎(chǔ)。但此后的深度學(xué)習(xí)并沒有在此路徑上取得好的成果,指導(dǎo)2012年的Alexnet在CNN上的巨大成功,才引領(lǐng)學(xué)習(xí)模型從傳統(tǒng)方法到深度方法的演進。
?
二? 模板類
????? PCL算法庫幾乎完全使用模板庫編程,以適應(yīng)各種類型的點云數(shù)據(jù),使用PointT代替PointRGBAX...之類的;
????? 以RanSac為例,SampleConsensus 貌似是一個抽象類
template <typename PointT>class RandomSampleConsensus : public SampleConsensus<PointT>{typedef typename SampleConsensusModel<PointT>::Ptr SampleConsensusModelPtr;public:typedef boost::shared_ptr<RandomSampleConsensus> Ptr;typedef boost::shared_ptr<const RandomSampleConsensus> ConstPtr;using SampleConsensus<PointT>::max_iterations_;using SampleConsensus<PointT>::threshold_;using SampleConsensus<PointT>::iterations_;using SampleConsensus<PointT>::sac_model_;using SampleConsensus<PointT>::model_;using SampleConsensus<PointT>::model_coefficients_;using SampleConsensus<PointT>::inliers_;using SampleConsensus<PointT>::probability_;/** \brief RANSAC (RAndom SAmple Consensus) main constructor* \param[in] model a Sample Consensus model*/RandomSampleConsensus (const SampleConsensusModelPtr &model) : SampleConsensus<PointT> (model){// Maximum number of trials before we give up.max_iterations_ = 10000;}/** \brief RANSAC (RAndom SAmple Consensus) main constructor* \param[in] model a Sample Consensus model* \param[in] threshold distance to model threshold*/RandomSampleConsensus (const SampleConsensusModelPtr &model, double threshold) : SampleConsensus<PointT> (model, threshold){// Maximum number of trials before we give up.max_iterations_ = 10000;}/** \brief Compute the actual model and find the inliers* \param[in] debug_verbosity_level enable/disable on-screen debug information and set the verbosity level*/bool computeModel (int debug_verbosity_level = 0);}; }?
總結(jié)
以上是生活随笔為你收集整理的三维重建16:概率图模型 模板类编程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 三维重建15:最近遇到的-标定-EKF-
- 下一篇: 脑洞大师87关怎么过 汉典脑字的基本解释