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

CSV export strategy for Rectangle annotations #122

Merged
merged 7 commits into from
Apr 13, 2024

Conversation

kaiwinter
Copy link
Contributor

While I was following this guide I needed BoundingBoxEditor to export the annotations to a CSV file. As the format is pretty specific, I'm not sure if it may be a good addition for this project. But maybe it can be extended to be more flexible in the future. The exporter can only export Rectangle annotations.

What do you think, can this be merged?

I introduced two new dependencies: OpenCSV for writing the CSV file and Jimfs for the unit tests.

@mfl28
Copy link
Owner

mfl28 commented Mar 15, 2024

Hi Kai!
This seems to be an ultra-specific CSV annotation format for this particular dataset that isn't used anywhere (?) else. Imho this makes its usefullness very limited.

In a quick search I could find a "Tensorflow Object Detection CSV format" (e.g. here, basically: filename,width,height,class,xmin,ymin,xmax,ymax) that seems to be similar and at least more commonly used (as an intermediate format for Tensorflow's TFRecord). I think this format would be more useful as the "CSV"-export format and it would be trivial to "transform" it into your particular format (filename->name, class->label).

I'd still say we can merge your PR for now and I'll change it to the Tensorflow format in a separate PR later on.

@mfl28
Copy link
Owner

mfl28 commented Mar 15, 2024

Can you run the LicenseFormat Gradle task on your updated branch and push the changes? Some of your new files have missing headers which results in the CI error.

@kaiwinter
Copy link
Contributor Author

Done that. Wow, I didn't know that the CSV format was SO special. That was just a brief excursion into this topic for me.

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 78.94737% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 86.41%. Comparing base (f7f1d14) to head (917c6f1).

Files Patch % Lines
...mfl28/boundingboxeditor/controller/Controller.java 0.00% 3 Missing ⚠️
...28/boundingboxeditor/model/io/CSVSaveStrategy.java 92.30% 2 Missing ⚠️
...oxeditor/model/io/ImageAnnotationSaveStrategy.java 50.00% 2 Missing ⚠️
...github/mfl28/boundingboxeditor/ui/MenuBarView.java 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #122      +/-   ##
============================================
- Coverage     86.46%   86.41%   -0.06%     
- Complexity     1480     1486       +6     
============================================
  Files            95       96       +1     
  Lines          5933     5970      +37     
  Branches        534      540       +6     
============================================
+ Hits           5130     5159      +29     
- Misses          527      535       +8     
  Partials        276      276              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mfl28 mfl28 merged commit 9727ce7 into mfl28:master Apr 13, 2024
6 checks passed
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.

2 participants