-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Initial working version of VOC XML import #280
Conversation
Hi, @hartmannr76 👋! VOX XML import/export was on my to-do list for a long time. I'm also super excited to see a new contributor! It would be really helpful if you could provide me with a small dataset in VOX XML format so I can test it locally. I imagine that you have something that you use for development. |
Hi! Doesn't this project already have VOC export or are you looking to add features to that? Also, I was able to test this with a public dataset. Here is a fairly small one that you're able to export to VOC format with |
Codecov Report
@@ Coverage Diff @@
## develop #280 +/- ##
===========================================
+ Coverage 14.51% 14.72% +0.20%
===========================================
Files 153 154 +1
Lines 4596 4660 +64
Branches 840 845 +5
===========================================
+ Hits 667 686 +19
- Misses 3928 3973 +45
Partials 1 1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@hartmannr76 I did the review. Overall code is clean. I did test that and it works. I see that you based the importer on |
@hartmannr76, let's also update the README.md file in the Import Formats section to reflect that we will now support VOC XML imports. :) |
Updated to address comments. I'll add in error handling and tests in the next commit. Few general questions I had for your expectations around some of this -
With the result being an aggregate annotation set of [1, 2, 3, 4, 5] |
@hartmannr76 I like the changes.
const onFailure = () => {
setIsLoading(false)
const notification = modelSource === ModelSource.UPLOAD ?
Notification.MODEL_LOAD_ERROR : Notification.MODEL_DOWNLOAD_ERROR
submitNewNotificationAction(NotificationUtil.createErrorNotification(NotificationsDataMap[notification]))
} I hope it is not too complicated. Let me know if you'd need my help to figure it all out. |
Yes, the design is currently not additive. It was done like that to simpliphy the execution. Maybe that is not true for VOC XML, but in principle, for other formats, it would require not only to simply add new names to All in all, I'm actually thinking about redesigning the import/export system, but let's not focus on that in this PR. However, if you have time to continue makesense.ai contributions then we could meet, discuss and fix all the problems with the import/export mechanism. |
src/logic/import/voc/VOCImporter.ts
Outdated
fileParseResults: FileParseResult[], | ||
}; | ||
|
||
class DocumentParsingError extends Error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SkalskiP These types of errors are likely similar to existing YOLO and COCO errors and could be genericized but since I'm only using them in this file at the moment just to indicate what imported file had the issue, I was planning to just keep them here for now. Let me know if you'd like me to move it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We can keep them here for now. But you are right, long term we could centrally think about the standardization of error types for different label formats, where possible.
I usually side with tests being exhaustive but I'm also ok with just testing this for now. Added the main expectations for the function
Ah, so I meant just to have specific messaging for what went wrong during the import. The notification handling probably should be handled at the
I've definitely enjoyed using this so I'd be happy to give input and help where I can. I can't promise too much of a time commitment though as I already have a few side-projects I have on top of my professional work-load 😄 |
Hi, @hartmannr76! I apologize for being quiet for the last few days. I was not feeling well and needed to rest.
I'm much more relaxed with testing lately. After watching this conversation I tend to not over-focus on testing.
Yes. You'll get an error as an argument of
No worries! I understand. I just love to work with skillful contributors 😅 |
I guess notifications is the last part that is left :) |
Hi, @hartmannr76! The changes look good. Thank you very much for your contribution. I'm merging PR to develop. |
Pre-flight checklist
Confirmed the import works as expected locally. I had a bit of a hard time understanding the expected import format from the
onSuccess
so I wanted to push an early working version to gather your input to see if this made sense before I started digging into tests.Please let me know what you think