SoccerNet / sn-tracking

Repository containing all necessary codes to get started on the SoccerNet Tracking challenge. This repository also contains benchmark methods to get started.
70 stars 17 forks source link

ByteTrack with CPU? #3

Closed rmarcelino4 closed 2 years ago

rmarcelino4 commented 2 years ago

Only to double check if it's possible to use ByteTrack without CUDA?

kl2005ad commented 2 years ago

Unfortunately that is not an option for now.

rmarcelino4 commented 2 years ago

as I don't have cuda available on the computer where I currently work, I looked at the code for "demo_tack.py", line 314 and changed it to: args.device = torch.device("cpu" if args.device == "gpu" else "cpu")

apparently, I can evolve once it comes to me:

(base) ruimarcelino@iMac-de-Rui ByteTrack_HOME % bash run_bytetrack_gt_batch.sh
2022-03-27 12:24:57.180 | INFO | main:main:317 - *Args: Namespace(aspect_ratio_thresh=1.6, camid=0, ckpt='pretrained/bytetrack_x_mot20.tar', conf=None, demo='image', device=device(type='cpu'), exp_file='exps/example/mot/yolox_x_soccernet.py', experiment_name='yolox_x_soccernet', fp16=True, fps=30, fuse=True, match_thresh=0.8, min_box_area=10, mot20=False, name=None, nms=None, path='/SN_tracking///img1', save_result=True, track_buffer=30, track_thresh=0.5, trt=False, tsize=None) /Users/ruimarcelino/opt/anaconda3/lib/python3.8/site-packages/torch/functional.py:445: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2157.) return _VF.meshgrid(tensors, kwargs) # type: ignore[attr-defined] 2022-03-27 12:24:57.921 | INFO | main:main:327 - Model Summary: Params: 99.00M, Gflops: 1425.12 2022-03-27 12:24:57.922 | INFO | main:main:335 - loading checkpoint 2022-03-27 12:24:59.250 | INFO | main:main:339 - loaded checkpoint done. 2022-03-27 12:24:59.250 | INFO | main:main:342 - Fusing model...

despite this, I can't do anything else... because of the following error:

Traceback (most recent call last): File "tools/demo_track.py", line 373, in main(exp, args) File "tools/demo_track.py", line 364, in main image_demo(predictor, vis_folder, current_time, args) File "tools/demo_track.py", line 189, in image_demo outputs, img_info = predictor.inference(img_path, timer) File "tools/demo_track.py", line 155, in inference height, width = img.shape[:2] AttributeError: 'NoneType' object has no attribute 'shape'

does it have to do with not using CUDA? Or is the cause of the error something else? You can help? Thanks

SilvioGiancola commented 2 years ago

I don't think that has anything to do with CUDA. It just looks like your image is not loaded at all (None). Maybe check your path='/SN_tracking//*/img1'.