Giter Site home page Giter Site logo

Comments (6)

FUJITASHONO avatar FUJITASHONO commented on May 14, 2024 2

@ifzhang I get same error.
I think If the detection model doesn't detect any region proposal, output of detection model is None and this None cause this error.

from bytetrack.

ifzhang avatar ifzhang commented on May 14, 2024 1

Thank you very much for pointing out the error. It is caused by empty outputs of the detection results. I have fixed it now!

from bytetrack.

FloWuenne avatar FloWuenne commented on May 14, 2024 1

@ifzhang Any news on why this error still occurs?

from bytetrack.

FloWuenne avatar FloWuenne commented on May 14, 2024

I am still running into the same error.
I am using ByteTracker with the Docker container. I was able to succesfully build the container, execute the docker run command and enter the container.

From within the container, I am trying to either run the demo or run ByteTracker on a custom video like this:

python3 tools/demo_track.py video -f exps/example/mot/yolox_x_mix_det.py -c pretrained/bytetrack_x_mot17.pth.tar --fp16 --fuse --save_result

I get the same error even though I cloned the repository today... Any suggestions?

2021-11-23 02:23:58.609 | INFO     | __main__:main:291 - Args: Namespace(camid=0, ckpt='pretrained/bytetrack_x_mot17.pth.tar', conf=None, demo='video', device='gpu', exp_file='exps/example/mot/yolox_x_mix_det.py', experiment_name='yolox_x_mix_det', fp16=True, fuse=True, match_thresh=0.8, min_box_area=10, mot20=False, name=None, nms=None, path='./videos/palace.mp4', save_result=True, track_buffer=30, track_thresh=0.5, trt=False, tsize=None)
2021-11-23 02:23:59.242 | INFO     | __main__:main:301 - Model Summary: Params: 99.00M, Gflops: 791.73
2021-11-23 02:24:01.371 | INFO     | __main__:main:312 - loading checkpoint
2021-11-23 02:24:01.705 | INFO     | __main__:main:316 - loaded checkpoint done.
2021-11-23 02:24:01.705 | INFO     | __main__:main:319 - 	Fusing model...
/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py:561: UserWarning: The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad attribute won't be populated during autograd.backward(). If you indeed want the gradient for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor instead. See github.com/pytorch/pytorch/pull/30531 for more information.
  if param.grad is not None:
2021-11-23 02:24:02.216 | INFO     | __main__:imageflow_demo:236 - video save_path is ./YOLOX_outputs/yolox_x_mix_det/track_vis/2021_11_23_02_24_02/palace.mp4
2021-11-23 02:24:02.217 | INFO     | __main__:imageflow_demo:246 - Processing frame 0 (100000.00 fps)
Traceback (most recent call last):
  File "tools/demo_track.py", line 350, in <module>
    main(exp, args)
  File "tools/demo_track.py", line 343, in main
    imageflow_demo(predictor, vis_folder, current_time, args)
  File "tools/demo_track.py", line 250, in imageflow_demo
    online_targets = tracker.update(outputs[0], [img_info['height'], img_info['width']], exp.test_size)
  File "/workspace/ByteTrack/yolox/tracker/byte_tracker.py", line 166, in update
    if output_results.shape[1] == 5:
AttributeError: 'NoneType' object has no attribute 'shape'

from bytetrack.

kompaso avatar kompaso commented on May 14, 2024

Same error with empty output from custom detector.

from bytetrack.

kompaso avatar kompaso commented on May 14, 2024

Fast fix:
if custom_detector_res:
online_targets = tracker.update(custom_detector_res, [img_info['height'], img_info['width']], exp.test_size)
You can update tracker only if your detector returns anything.

from bytetrack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.