Skip to content

Commit

Permalink
Update ManualLabellingSteps.md with gotcha re category ID (#263)
Browse files Browse the repository at this point in the history
Signed-off-by: sfmig <33267254+sfmig@users.noreply.github.com>
  • Loading branch information
sfmig authored Feb 21, 2025
1 parent 8fcae8f commit fb4f7aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions guides/ManualLabellingSteps.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ There are some differences to note between the COCO format and the VIA format:
- To correctly export the data in COCO format, we need to define a category for the annotations (as specified in the steps above). If we don't, none of the annotations are exported to the COCO file.
- The COCO format also requires the category ID to be an integer (this is also highlighted in the steps above). If we provide a category ID that is a string, the VIA export will accept it, but the COCO exported file will produce a category ID equal to `null`.
- Given the same VIA project, the image ID in the COCO generated file and in the VIA generated file may not match. This is because in the conversion to COCO format, sometimes the VIA tool attempts to infer the image ID from the image filename. Also, in the VIA format the image ID will be 0-indexed, whereas in the COCO format, when the image ID cannot be extracted from the filename, it will be 1-indexed.
- If the category ID is specified as an integer in the VIA tool (e.g., id = 33), its value in the VIA exported file will match the integer value set using the tool. However, in the COCO exported file, the category ID is always forced to be a 1-based index.
## Appendix B: COCO format
Expand Down

0 comments on commit fb4f7aa

Please sign in to comment.