-
Notifications
You must be signed in to change notification settings - Fork 443
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
MaskDINO ResNet50 #3977
MaskDINO ResNet50 #3977
Conversation
This reverts commit b9f9c9a.
This reverts commit eb8379b.
* tiling-semantic seg * update recipe * update unit test * add unit test * add test and test dataset * update test * refactor tests * address some comments * update tile adaptor * add seg tiler test * update src/otx/recipe/semantic_segmentation/dino_v2_tile.yaml * update explain_mode
I think an objective of unit test is to check each component is executed as we expected and one of principles to make good unit test is testing one thing (refer). "tests/unit/algo/instance_segmentation/test_maskdino.py" may run most of code added but It is hard to say that it checks every component works as we expected. If it's too time consuming to implement all unit tests, then how about skipping a code copied and not changed at all but implementing a unit test for code implemented or changed by our side? |
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.
Thanks for this update, I'd like to request few things:
- there seems to be a lot of duplicate implementations with the otx implementation. Could you check it and if they can be used instead or updated for your implementation?
- could you update all docstrings in all files you worked?
- could you consider to modify your implementations to align it with otx instead of adding them as is?
src/otx/algo/instance_segmentation/heads/pixel_decoder/position_encoding.py
Show resolved
Hide resolved
@sungchul2 Thanks for reviewing! The first and third questions are pretty similar—essentially, there are just too many modules to refactor all at once. My intent with this PR is to make the candidate algorithm compatible with OTX (training, testing, prediction, export, optimizer), rather than solving everything in one go. Testing and refactoring will happen in the next stage. As for the second question, I’m not sure I fully understand. Are you asking me to update "ALL" the docstrings for MaskDINO? I don’t think it’s necessary unless they’re missing. Afaik, all the docstrings are already in place. Could you clarify? |
As far as I know, otx is following google style docstrings but I found some parts aren't (of course, I didn't check all parts). For examples, it is not following the style.
About arguments, I don't know training_extensions/src/otx/algo/instance_segmentation/heads/transformer_decoder/dino_decoder.py Lines 51 to 61 in 8665486
Some parts are missed. training_extensions/src/otx/algo/instance_segmentation/layers/batch_norm.py Lines 66 to 77 in 8665486
Usually, args in docstrings have type hint, but they aren't. It needs to follow others. training_extensions/src/otx/algo/instance_segmentation/losses/hungarian_matcher.py Lines 18 to 27 in 8665486
I think it is your job to find these things and looking for them is a waste of reviewer's time. |
@sungchul2 Thanks for the suggestion! I will make sure all docstrings comply with the current style. That said, there are a few areas where I have doubts. A lot of the existing code doesn’t align with the standards you mentioned. While I understand your point, the current state of the repository has inconsistent documentation policies, making it unclear how to fully address your concerns. For example, in rtdetr_decoder.py, there’s no clear documentation on memory handling, and Similarly, in _build_model, the function lacks complete documentation. I’m not pointing fingers; it’s just that unclear code and sparse documentation exist throughout the codebase. If we aim to uphold a certain standard, we should apply it uniformly, whether it’s for past, present, or future PRs. The process isn’t perfect right now but progress will come. |
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.
Thank you for your work. Let's make a refactoring in the next PRs
@eunwoosh @sungchul2 thanks for the discussion, let's wait for the next PR to continue there |
Summary
Introduces MaskDINO ResNet50 model:
How to test
Checklist
License
Feel free to contact the maintainers if that's a concern.