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

New utility feature class filtering for Object Detectors 2D #467

Merged
merged 16 commits into from
Oct 2, 2023

Conversation

katdimitris
Copy link
Collaborator

@katdimitris katdimitris commented Sep 26, 2023

Implemented class filtering for object detectors using a wrapper. The wrapper accepts a Learner object and a list of desired classes for detection. These classes should be within the set that the learner is capable of detecting. An inference demo for YOLOv5 is also available.

Closes #464.

@katdimitris katdimitris added enhancement New feature or request test sources Run style checks labels Sep 26, 2023
@katdimitris katdimitris self-assigned this Sep 26, 2023
@katdimitris katdimitris marked this pull request as ready for review September 28, 2023 13:44
@tsampazk tsampazk self-requested a review September 28, 2023 14:37
@tsampazk tsampazk added the test tools Test the toolkit methods label Sep 28, 2023
Copy link
Collaborator

@tsampazk tsampazk left a comment

Choose a reason for hiding this comment

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

Thank you @katdimitris, very nice job. I have added some comments. Mainly handling nanodet img/input is a bit problematic.

katdimitris and others added 8 commits October 2, 2023 10:04
…rapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…rapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
…rapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
@katdimitris katdimitris requested a review from tsampazk October 2, 2023 07:19
Copy link
Collaborator

@tsampazk tsampazk left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you @katdimitris!

Copy link
Collaborator

@passalis passalis left a comment

Choose a reason for hiding this comment

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

Thank you!

@katdimitris katdimitris merged commit 1381ca8 into develop Oct 2, 2023
47 checks passed
@katdimitris katdimitris deleted the feature-class-filter branch October 2, 2023 12:06
lucamarchionni pushed a commit to lucamarchionni/opendr that referenced this pull request Jun 10, 2024
…u#467)

* Added initial version of class filtering

* added parameter conditions for all implemented learners

* added parameter conditions for all implemented learners

* final implementation of class filtering for object detectors. added inference demo for yolov5.

* correction inference demo for yolov5.

* small fixes to pass tests

* added License Copyright to pass test

* Update src/opendr/perception/object_detection_2d/utils/class_filter_wrapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update projects/python/perception/object_detection_2d/yolov5/filtered_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update projects/python/perception/object_detection_2d/yolov5/filtered_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update projects/python/perception/object_detection_2d/yolov5/filtered_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update projects/python/perception/object_detection_2d/yolov5/filtered_inference_demo.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update src/opendr/perception/object_detection_2d/utils/class_filter_wrapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Update src/opendr/perception/object_detection_2d/utils/class_filter_wrapper.py

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>

* Removed filtering support for RetinaFace, since it exclusively detects face objects.

---------

Co-authored-by: Kostas Tsampazis <27914645+tsampazk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test sources Run style checks test tools Test the toolkit methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants