The first class is always not detected in inference

The reason is found.

“categories”: [{“id”: 0, “name”: “single_broken_white_line”}, {“id”: 1, “name”: “continuous_white_line”}, {“id”: 2, “name”: “parallel_continuous_white_line”}, {“id”: 3, “name”: “single_continuous_yellow_line”}, {“id”: 4, “name”: “parallel_continuous_yellow_line”}, {“id”: 5, “name”: “stop_line”}, {“id”: 6, “name”: “hatched_road_marking”}, {“id”: 7, “name”: “stop_text”}, {“id”: 8, “name”: “straight_arrow”}, {“id”: 9, “name”: “left_arrow”}, {“id”: 10, “name”: “right_arrow”}, {“id”: 11, “name”: “straight_left_arrow”}, {“id”: 12, “name”: “straight_right_arrow”}, {“id”: 13, “name”: “straight_left_right_arrow”}, {“id”: 14, “name”: “yellow_box”}, {“id”: 15, “name”: “yellow_hatched”}, {“id”: 16, “name”: “black_white_carb”}, {“id”: 17, “name”: “hump”}, {“id”: 18, “name”: “jagged_line”}, {“id”: 19, “name”: “light_truck”}, {“id”: 20, “name”: “heavy_vehicle”}, {“id”: 21, “name”: “corner_carb”}]}

In categories dict, the id should start from 1 instead of 0. That means please change to

“categories”: [{“id”: 1, “name”: “single_broken_white_line”}, {“id”: 2, “name”: “continuous_white_line”}, {“id”: 3, “name”: “parallel_continuous_white_line”} …

In annotations dict, the category_id should start from 1 instead of 0. That means please change each image’s “category_id” as well. To match above-mentioned “categories” dict.

Sorry for the inconvenient. Currently, the dataset_convert does not help customer check this. We will improve this to do value checking during tfrecords generation via dataset_convert to avoid such issues.