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

How to run inference on videos directly #12

Open
usman-bsee opened this issue Apr 20, 2024 · 1 comment
Open

How to run inference on videos directly #12

usman-bsee opened this issue Apr 20, 2024 · 1 comment

Comments

@usman-bsee
Copy link

Dear Author,
Thanks for your interest, Please can you guide how to run inference on new videos without loading datasets in the dataset directory.
Thanks.

@ret-1
Copy link
Collaborator

ret-1 commented Apr 20, 2024

Hello,

In inference, the get_eval_loader function defined in the exp file is used to get the DataLoader:

val_loader = exp.get_eval_loader(args.batch_size, is_distributed, args.test, return_origin_img=True)
evaluator = MOTEvaluator(
args=args,
dataloader=val_loader,
img_size=exp.test_size,
confthre=exp.test_conf,
nmsthre=exp.nmsthre,
num_classes=exp.num_classes,
)

Since we haven't provided a script to directly run inference on custom videos, you need to manually convert it to coco format, create a new exp file, and modify the get_eval_loader function to correctly read your data.

You could refer to yolox_x_sportsmot.py and convert_sportsmot_to_coco.py

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