機器視覺的專家要做的一件很重要的事情就是判斷使用哪種標註工具獲得的訓練數據可以得到最準確的模型
你可能會用完全不同的標註發方法來處理一批同樣的原始數據或者爲了另外的算法完全重新標註原始數據來得到更高的模型準確率。
在SPARKAPI,我們針對人工智能的企業採用更人性化的服務。
在和客戶交談的過程中,我們經常會被問到針對某個特定的項目,我們推薦什麼樣的標註工具。我們已經幫助通過龐大的標註任務幫助客戶解決了多種多樣的應用案例。
當在大規模的構建自己的標註好的訓練數據集時,有必要熟悉一下正確的標註工具和它們的用處,例如其他的AI企業是怎麼收集訓練數據的,他們如何選擇標註工具類型應用在特定的項目中。
But which annotation type is right for your project? Everything depends on the kind of use case you have.
圖像標註工具對比圖表
Hope you find them useful.
2D框標註 Bounding Box:
正像它的名字一樣,標註員工需要在指定的物體周圍畫一個框。一般訓練用於物體分類和定位的模型。
應用場景:
- 運動分析-框選出足球運動員然後爲他們歸類到特點的組
- 框選出施工現場的工具用來分析施工現場是否符合安全標註
- 框選損壞的車部位,爲保險理賠提供依據。
//rectangles (To be corrected) "rectangles": [{ "coordinates": { "xmin": 0.38, "ymin": 0.19, "xmax": 0.57, "ymax": 0.44 }, "label": "car" }]
多邊形分割標註:
多邊形工具一般用來標註不規則的物體。和框標註不同,多邊形標註不會在目標物體周圍有很多無關的空白或者其他的物體(多餘的空白或者物體可能會讓機器模型困惑)。多邊形標註在訓練定位模型時,會更加準確。
//polygons - We can share both JSON metadata & masked images "polygons": [{ "points": { "p1": { "x": 0.17, "y": 0.58 }, "p2": { "x": 0.26, "y": 0.63 }, "p3": { "x": 0.27, "y": 0.63 }, "p4": { "x": 0.29, "y": 0.59 }, "p5": { "x": 0.25, "y": 0.46 }, "p6": { "x": 0.22, "y": 0.42 } }, "edges": { "e1": ["p1", "p2"], "e2": ["p2", "p3"], "e3": ["p3", "p4"], "e4": ["p4", "p5"], "e5": ["p5", "p6"] }, "label": "parking_lot" }]
線標註:
線標註(也被稱作道路標註),即畫出車道或者其他的線,經常被用來訓練自動駕駛對道路的感知模型。不像框標註,線標註也沒有那麼多的無意義的空白或者多餘的噪音。
{ "request_id": "", "image_url": "", "lines": [{ "line_id" : "5eb732a5-7e66-4212-9782-372908eda25e", "points": { //the order of the points is the "p1": { "x": 17, "y": 58 }, "p2": { "x": 26, "y": 63 }, "p3": { "x": 27, "y": 63 }, "p4": { "x": 29, "y": 59 }, "p5": { "x": 25, "y": 46 }, "p6": { "x": 22, "y": 42 } }, "label": "single_solid", "meta_data" : { //Refer the meta_data section below "lane_diverging": "false", "lane_direction": "ongoing", "line_visibility": "inferred", "line_occlusion" : "true", "lane_to_the_left" : "left_1", "lane_to_the_right" : "ego_lane" } },{}] }
點標註:
點標註經常用於發現形狀變化和對微笑的物體計數。
應用場景:
- 發現和識別面部特徵
- 標註運動中的人體部分
- 用來表情和手勢識別
//Dot Annotation [{ "id": "001", "image_url": ["https:///001.jpg"], "landmarks": [{ "points": { "p1": { "x": 0.17, "y": 0.58, "label": 1 }, "p2": { "x": 0.26, "y": 0.63, "label": 2 }, "p3": { "x": 0.27, "y": 0.63, "label": 3 }, "p4": { "x": 0.29, "y": 0.59, "label": 4 }, "p5": { "x": 0.25, "y": 0.46, "label": 5 }, "p6": { "x": 0.22, "y": 0.42, "label": 6 } }, "label": "nose" }, { "points": { "p1": { "x": 0.17, "y": 0.58, "label": 1 }, "p2": { "x": 0.26, "y": 0.63, "label": 2 }, "p3": { "x": 0.27, "y": 0.63, "label": 3 }, "p4": { "x": 0.29, "y": 0.59, "label": 4 }, "p5": { "x": 0.25, "y": 0.46, "label": 5 }, "p6": { "x": 0.22, "y": 0.42, "label": 6 } }, "label": "left-ear" }...] }, { "id": "002", "image_url": ["https:///002.jpg"], "landmarks": [{ "points": { "p1": { "x": 0.17, "y": 0.58, "label": 1 }, "p2": { "x": 0.26, "y": 0.63, "label": 2 }, "p3": { "x": 0.27, "y": 0.63, "label": 3 }, "p4": { "x": 0.29, "y": 0.59, "label": 4 }, "p5": { "x": 0.25, "y": 0.46, "label": 5 }, "p6": { "x": 0.22, "y": 0.42, "label": 6 } }, "label": "nose" }, { "points": { "p1": { "x": 0.17, "y": 0.58, "label": 1 }, "p2": { "x": 0.26, "y": 0.63, "label": 2 }, "p3": { "x": 0.27, "y": 0.63, "label": 3 }, "p4": { "x": 0.29, "y": 0.59, "label": 4 }, "p5": { "x": 0.25, "y": 0.46, "label": 5 }, "p6": { "x": 0.22, "y": 0.42, "label": 6 } }, "label": "left-ear" }...] } ]
3D立方體標註:
3D立方體經常用於計算車輛的深度和距離
//cuboids "cuboids": [{ "label": "Pedestrian", "points": { "p1": { "x": 0.4164711477938035, "y": 0.3934434942010466 }, "p2": { "x": 0.4238544518253917, "y": 0.3934434942010466 }, "p3": { "x": 0.4238544518253917, "y": 0.4236330040190965 }, "p4": { "x": 0.4164711477938035, "y": 0.4236330040190965 }, "p5": { "x": 0.4164711477938035, "y": 0.4236330040190965 }, "p6": { "x": 0.4164711477938035, "y": 0.4236330040190965 }, "p7": { "x": 0.4164711477938035, "y": 0.4236330040190965 }, "p8": { "x": 0.4164711477938035, "y": 0.4236330040190965 } }, "front": { "coordinates": ["p1", "p2", "p3", "p4"] }, "side": { "coordinates": ["p2", "p3", "p5", "p6"] }, "back": { "coordinates": ["p5", "p6", "p7", "p8"] } } ]
語義分割標註:
像素級的語義分割經常用於需要標註圖片中的所有像素的實例中。多邊形分割一般是把特定的某個物體標註出來,全語義分割用於對場景中的每個像素提供理解
應用場景:
- 像素級的物體識別和定位.
{ "result" : [ { "image_id" : 1 "points" : { "p1" : {'x':x1, 'y':y1}, "p2" : {'x':x2, 'y':y2}, "p3" : {'x':x3, 'y':y3} } "polygons" : [ { "class_id" : 4, "instance_id" : 1, "class_label" : "person", "exterior" : [p1, p2, p3], "interior" : [] } ] } ] }
一些建議
- 儘量用你自己的數據.開源數據集可能能使你的算法達到80%準確度,但是如果你想得到更高的準確率,你需要有自己的數據。
- 多邊形應該儘量貼合被標註的物體,這樣可以提供你的模型的速度和精確度
- 要規定框的最小高度和寬度
- 選擇容易理解的標註標籤類別(比如用轎車,然不用車輛)
- 對於運動的物體例如(自動駕駛汽車)用框選或者3D立方體標註
- 對於靜態的物體,用多邊形或者線標註.