Reject Similar Frames + UI Improvements#1
Open
AnTaRes27 wants to merge 14 commits intoRedHawk989:mainfrom
Open
Reject Similar Frames + UI Improvements#1AnTaRes27 wants to merge 14 commits intoRedHawk989:mainfrom
AnTaRes27 wants to merge 14 commits intoRedHawk989:mainfrom
Conversation
need to explicitly limit python ver to <3.13 to keep pyinstaller v5. not sure if you want to bump that or not
uses cv2 template matching to compare against previous frames and skips saving frames that are too similar
grabbed the point placement hints from the dev updates post. kboard shortcut hints from the print statement above
Author
|
I think a lot of changes are also due to ruff, a lot of deletions in the poetry lock file just cuz they weren't in the pyproject.toml |
i make mistakes a lot when annotating XD
|
I agree with the dog |
… into ui-improvements
yeah i do this a lot
makes it look more intuitive
annotator will still only annotates good data
bug caused output data to be different than expected/required, unable to be read by data validator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Annotation script will reject frames that are too similar to try and minimise duplicates to encourage more varied data.
Works by using opencv's template matching to compare the most recent frame loaded against the previous few frames that was saved. If they're too similar, it'll reject it and move on to the next. Otherwise it'll save. This does increase initial processing time quite significantly, though. From my testing, out of 1600 frames, it spits out 400ish good frames. But 400 varied frames :>
SIMILARITY_LOOKBACK_COUNTsets how many previous images to compare it with.SIMILARITY_THRESHOLDsets the template matching threshold. 0.99 seems to be nice starting point.Also added some hints/overlay when annotating and also keyboard shortcut hints as footer. Saved points are clamped to the image size even if somehow someone managed to put an annotation point on the footer.
Another feature added was ability to go backwards in the list of images. If i make a mistake I can just go back and edit the points and save.
And last thing i added was rotating image while annotating. Helps when annotating (helps with my pattern recognising monkey brain) but im sure i haven't handled edge cases sooooooooo
The data is still saved in its original form though, as if nothing was rotated in the first place.