语义分割车道线,来自两篇论文的融合算法
語義分割車道線,來自兩篇論文的融合算法
IEEE IV 2018論文《LaneNet: Real-Time Lane Networks for Autonomous Driving》。這篇文章主要內容是,如何克服車道切換和車道數的限制。
關于Software Loss,另外一篇文章《Semantic Instance Segmentation with a
Discriminative loss function》。
原理是:提出了Lannet網絡結構,即通過訓練神經網絡進行端到端的車道檢查,將車道作為實例分割來實現。
下面是Lannet網絡結構圖:
-
Lanenet使用一個共享的encoder,對輸入圖像進行處理,得到2個branch:嵌入式和語義分割的branch。嵌入branch可以將不同的車道線區分為不同的instance;因為只需要考慮車道線,因此語義分割的結果是二值化圖像;然后對2個branch做聚類,最終得到結果。
-
通常情況下,車道線像素被投影成“鳥瞰圖”。使用一個固定的轉換矩陣。可是,因為變換參數對所有圖像都是固定的,所以,當遇到非地面例如,在斜坡上,會有問題。為了解決類似問題,提出了H-Network可以估算輸入圖像上的“理想”透視變換的參數。
-
投影方法H-Net
將輸入的RGB圖像作為輸入,使用LaneNet得到輸出的實例分割結果,然后將車道線像素使用H-Net輸出得到的透視變換矩陣進行變換,對變換后的車道線像素在變化后的空間中進行擬合,再將擬合結果經過逆投影,最終得到原始視野中的車道線擬合結果。
H-Net將RGB作為輸入,輸出為基于該圖像的透視變換系數矩陣,優化目標為車道線擬合效果。
- Software
Loss計算
與主流的基于proposal的實例分割(instance segementation)方法不同,本文受metric learning(測量學習)和(triplet loss)的啟發,提出了一種基于pixel embending的方法。與deep watered network一樣,本文方法也依賴于現成的語義分割結果,可以將本文方法視作語義分割結果的post processing以產生instance-level的結果。
One
key factor that complicates the baive application of the popular software
cross-entropy loss function to instance segmentation, is the fact that an image
can contain an arbitrary number of instances and that the labeling is
permutation-invariant: it does not matter which specific label an instance
gets, as long as it is different from all other instance labels.
上面指出,software loss用于實例分割的兩個缺點:
第一, an image can contain an arbitrary number of instances(一幅圖像可包含任意數量的實例)。
第二, the labeling is permution-invariant(實例標簽具有permutation-invariant的性質)。
將本用于語義分割的software loss用于圖像的實例分割,圖像包含多少個實例,就有多少個“類”。這里的類,并不是語義分割中的class-label的含義,而是指不同的insatnce的instance id label。
應用software loss的網絡,最后輸出層的channel數等于類別數,因為圖像中的實例數目不定,所以網絡最后層的結果無法確定。
如果網絡每個像素的預測輸出和ground truth的id-label不一致。
Softmax Loss會懲罰這種預測錯誤。但這種預測結果其實是對的,只要不同實例之間的id-label不同就行。即instance id label滿足permutation-invariant的性質。
Pixel embedding:mapping each pixel to a point in n-d feature space
Cluster:a group of pixel embendings sharing the same label
Cluster
center:the mean embebding of a char
Variance term:an intra-cluster pull-force that draws embeddings towards the mean
embedding, i.e. the cluster center.
Distance term:an inter-cluster push-force that pushes clusters away from each
other, increasing the distance between the cluster centers.
Regularization term:a small puul-force that draws all clusters towards the origin, to
keep the activations bounded.
The loss function encourages the network to map each pixel to a point in feature
space (pixel embedding) so that pixels belonging to the same instance lie close
together while different instances are separated by a wide margin.
用本文提出的 loss function對現有網絡進行訓練。優化的目標是:網絡將圖像每個像素投影到n-d特征空間(n是個隨機數據集變化二變化的超參),是的同屬一個實例的像素盡量靠近,形成一個cluster,每一個實例對應一個cluster,不同的cluster盡量遠離。
如果loss降為零,顯然:
5. 在多語義類別的實例分割場景中:
Therefore, we run our loss function independently on every semantic class, so that
instances belonging to the same class are far apart in feature space, whereas
instances from different classes can occupy tha same space. For example, the
cluster centers of a pedestrian and a car that appear in the same image are not
pushed away from each other.
概括起來,不同語義類別的實例像素潛入相互獨立,分開進行。
總結
以上是生活随笔為你收集整理的语义分割车道线,来自两篇论文的融合算法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 标题 相机标定(Camera calib
- 下一篇: Yolov1目标检测算法详细分析