YuHengsss / YOLOV

This repo is an implementation of PyTorch version YOLOV Series
Apache License 2.0
283 stars 39 forks source link

Online video inference #1

Closed zanilzanzan closed 1 year ago

zanilzanzan commented 1 year ago

Dear authors, really impressive approach and great results! Thank you for publishing your work. First of all, is it possible to run online/real-time inference on a video (stream), in a way that the feature aggregation is done on the previous frames and inference is run on the last frame? Does the script ./tools/yolov_demo_online.py target this purpose? Thanks in advance!

YuHengsss commented 1 year ago

Thanks for your attention. The ./tools/yolov_demo_online.py is the demo for online inference, only previous frames' information is involved.

YuHengsss commented 1 year ago

Dear authors, really impressive approach and great results! Thank you for publishing your work. First of all, is it possible to run online/real-time inference on a video (stream), in a way that the feature aggregation is done on the previous frames and inference is run on the last frame? Does the script ./tools/yolov_demo_online.py target this purpose? Thanks in advance!

We have updated the online demo, give it a try!

zanilzanzan commented 1 year ago

Thank you so much for taking your time and updating the codebase for online inference. Everything works as expected!

ayushag-glitch commented 1 year ago

Getting the following error while running the online demo script:

Traceback (most recent call last):
  File "tools/yolov_demo_online.py", line 320, in <module>
    main(exp, args)
  File "tools/yolov_demo_online.py", line 313, in main
    imageflow_demo(predictor, vis_folder, current_time, args)
  File "tools/yolov_demo_online.py", line 226, in imageflow_demo
    N = int(res_dict['cls_scores'].shape[0] / len(tmp_imgs))
TypeError: list indices must be integers or slices, not str

I have not changed anything in the script. Although I did check that pred_result, and res_dict are equal which are obtained from the inference step.

pred_result, res_dict = predictor.inference(imgs, other_result)

Can someone please guide me