Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utils for combining annotations #72

Merged
merged 24 commits into from
Oct 31, 2023
Merged

Conversation

sfmig
Copy link
Collaborator

@sfmig sfmig commented Oct 30, 2023

Made an annotations_utils modules with functions to:

  • combine several VIA JSON files into one (combine_multiple_via_jsons)
  • generate a COCO-formatted annotation file from a VIA JSON file (convert_via_json_to_coco)

I ended removed the previous combine_coco function (which appended COCO files two-by-two) as I found combining VIA JSON files was easier (we just need to append the data, no need to keep track of the ids), and so we could write more easily a function that combines several files in one go.

The previous convert_coco function is the basis for the convert_via_json_to_coco function with minor additions.

Also included a minor fix to the frame extraction test which were failing before.

Closes #70

@sfmig sfmig requested a review from nikk-nikaznan October 31, 2023 12:31
@sfmig sfmig marked this pull request as ready for review October 31, 2023 12:32
Copy link
Collaborator

@nikk-nikaznan nikk-nikaznan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good! Good move to create the utils for this. Run this locally including the pytest. Apart from directory, seems fine

tests/test_coco_and_via_conversions.py Outdated Show resolved Hide resolved
tests/test_coco_and_via_conversions.py Outdated Show resolved Hide resolved
@sfmig sfmig requested a review from nikk-nikaznan October 31, 2023 17:47
@nikk-nikaznan nikk-nikaznan merged commit 99e1fd1 into main Oct 31, 2023
2 checks passed
@nikk-nikaznan nikk-nikaznan deleted the smg/combine-annotations branch October 31, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combine bboxes labelling util functions in one module?
2 participants