BoT-SORT icon indicating copy to clipboard operation
BoT-SORT copied to clipboard

Reproducing results on my videos, with a custom trained yolox model

Open AhmedKhaled945 opened this issue 3 years ago • 13 comments

Hello, i have a custom trained model that i trained, (yolox), can i use it, is there any script on the repo that can let me use it along with reid or bytetracker, so i test the tracking on a video of mine? Thanks in advance.

AhmedKhaled945 avatar Aug 01 '22 14:08 AhmedKhaled945

Hello, Yes. Try to use our demo scripts: https://github.com/NirAharon/BoT-SORT/blob/a720e0490c6613dacccc0088f8c39c61725f1a63/README.md?plain=1#L213 Pass your YOLOX weights, exp files and video and it should work. If you trained your network for more than one class use the multi-class tracker version: mc_demo.py. Good luck!

NirAharon avatar Aug 01 '22 15:08 NirAharon

Thanks for the reply, I did this exactly, passed my weights to the -c argument, -f as my exp file, and video as my path argument, detector work correctly , but for some reason detection are being discarded and the final saved video has no visualized bboxes, I am using mot17 S50weights also,

is there any logic in mc_demo that discard detections? So i can fix it?

Thanks in advance

AhmedKhaled945 avatar Aug 01 '22 16:08 AhmedKhaled945

May you provide more information? Maybe you need to adjust the tracker thresholds, did you change the --new_track_thresh argument according to your network scores? Did you check that the tracker gets the detections correctly? Are you using demo.py or mc_demo.py? if you use the one class demo.py there is --aspect_ratio_thresh argument that filters vertical objects.

NirAharon avatar Aug 01 '22 16:08 NirAharon

I am using mc_demo, okay will check the threshold, thanks

AhmedKhaled945 avatar Aug 01 '22 16:08 AhmedKhaled945

@AhmedKhaled945 Has this been resolved? I ask because I am about to use this repo but your answer might save me some headaches if you have a workaround or found a fix. Thanks!

bdubbs09 avatar Aug 12 '22 19:08 bdubbs09

hi, i want to track multiclass when i pass this code, it still track only pedestrian. Any solution for this

python3 tools/mc_demo.py video --path v1.mp4 -f yolox/exps/example/mot/yolox_x_mix_det.py -c pretrained/bytetrack_x_mot17.pth.tar --with-reid --fuse-score --fp16 --fuse --save_result

faziii0 avatar Aug 24 '22 05:08 faziii0

Hi.

As you mentioned before, I passed my weights to the -c argument, -f as my exp file, and video path, also using mot17 S50weights. And the final saved video has no visualized bboxes.

Can you tell me how you solved this problem? @AhmedKhaled945

(python3 tools/demo.py video --path test.mp4 -c /home/YOLOX_outputs/yolox_voc_s/latest_ckpt.pth -f yolox/exps/example/mot/yolox_voc_s.py --with-reid --fuse-score --fp16 --fuse --save_result)

When I print outputs of [outputs, img_info = predictor.inference(img_path, timer)] line 162 in demo.py, "None" is printed. I think I should change [class Predictor(object)] line 89 in demo.py as I changed -f exp file. Is there any other advice for me? @NirAharon

Thank you.

jjjuurang avatar Aug 28 '22 20:08 jjjuurang

Hi @jjjuurang, Did you try this code with your trained YOLOX? because if so, it is sound like compatibility issues between YOLOX versions.

NirAharon avatar Oct 14 '22 13:10 NirAharon

@faziii0 did you change the Exp file self.num_classes from 1 and used trained multi-class YOLOX weights?

NirAharon avatar Oct 14 '22 13:10 NirAharon

Hi @NirAharon I am also facing the same problem. I am using the pretrained YOLOX tiny weight from the official YOLOX github repo model zoo and along with that I am also passing the corresponding YOLOX tiny exp file of yours and I have also change the number of classes to 80 since the original YOLOX model is trained on 80 classes however still I cannot visualise any detection box in the output video. It will be really helpful if you can suggest any update

aritra3520 avatar Mar 16 '23 07:03 aritra3520

Has this issue already been resolved?

We want to use YOLOX for object detection and are having trouble detecting objects when using the custom model. We have confirmed that object detection with the custom model has been successful, with an accuracy of approximately 70%.

It seems to be a problem before tracking.

Thanks in advance

tskawada avatar Jan 29 '24 05:01 tskawada

same issue. has anyone resolved??

nikoaakash avatar Jan 30 '24 14:01 nikoaakash

Hi, @NirAharon
I'm running a multi-class test with YOLOX , executing the following code:(Modified --new_track_thresh) python tools/mc_demo.py video --path 1.mp4 -f yolox/exps/example/yolox_voc/yolox_voc_s.py -c pretrained/best_ckpt.pth --with-reid --fuse-score --fp16 --fuse --save_result And the final saved video has no visualized bboxes, and there's nothing in the text. Is there any other advice for me? Thanks.

walkupupup avatar Mar 18 '24 02:03 walkupupup