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

[Question] Is there currently a way to replace the Yolox detector with another detector? #27

Closed
aelahi23 opened this issue May 6, 2022 · 7 comments

Comments

@aelahi23
Copy link

aelahi23 commented May 6, 2022

I want to try and run OC-SORT with a few different detectors (YoloV5, F-RCNN, CNN) just to experiment and see how well the detectors perform with OC-SORT.

@noahcao
Copy link
Owner

noahcao commented May 6, 2022

Currently, I have not support customized detectors here. But replacing it should be feasible by manipulating the returned model of get_model() here.

@aelahi23
Copy link
Author

aelahi23 commented May 6, 2022

@noahcao Ah I see thank you very much!

@aelahi23
Copy link
Author

aelahi23 commented May 11, 2022

I've been trying to replace the model returned by get_model() in demo track but it seems everything is centred around yoloX, is there a way to remove the get_exp() method and just inject a detector and run the tracker with just a random detector? Soon as I have it working with YoloV5 detector I'd be able to make a wrapper to allow others to add their detectors and make a pull request to help with adding support for any detector

@noahcao
Copy link
Owner

noahcao commented May 11, 2022

I made a PR to mmtracking to support OC-SORT. As mmtracking is based on mmdetection, you can replace the detector with what you want there.

@noahcao
Copy link
Owner

noahcao commented May 11, 2022

Also, it would be great if you can make a PR here to support customized detector. Using an abstract detector wrapper is a good idea. I would appreciate your contribution.

@aelahi23
Copy link
Author

aelahi23 commented May 19, 2022

I've tried to make a generic wrapper but have realised the problem lies within the function inference in the class predictor, different detectors expect input images in a specific form for example yoloV5 expects a image input in numpy array form but you seem to convert the images into a tensor form which causes the yoloV5 detector to improperly read an image and output bounding boxes as a tensor with the shape [1,229500,6] for a 1080*1920 image when instead yoloV5 should have output a numpy array of [x1,y1,x2,y2,score,class]. removing the tensor conversion causes a further trickle down problem since OCSort.py in the function convert_bbox_to_z and association.py in the fucntion iou_batch. I'm at a loss for how to make a generic wrapper without changing the data types required in OCSort.py and association.py, what would you reckon as a better solution to the generic detector wrapper problem? this seems like the final hurdle if I can solve this I can make a PR for OCsort here by tomorrow with a generic wrapper for other detectors

@noahcao
Copy link
Owner

noahcao commented Aug 16, 2022

Hi, some updates:

There is an implementation is another issue thread. Also, I have supported OC-SORT in mmtracking. You can move to mmtracking to have a more advanced and customized tracking implementation, where of course, customized detector is allowed.

@noahcao noahcao closed this as completed Sep 8, 2022
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

No branches or pull requests

2 participants