ByteTrack icon indicating copy to clipboard operation
ByteTrack copied to clipboard

AssertionError

Open shuyu888 opened this issue 2 years ago • 30 comments

Traceback (most recent call last): File "tools/train.py", line 112, in assert num_gpu <= torch.cuda.device_count() AssertionError

shuyu888 avatar Apr 18 '22 05:04 shuyu888

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

Melikamuliyih avatar Apr 18 '22 06:04 Melikamuliyih

Traceback (most recent call last): File "tools/train.py", line 112, in assert num_gpu <= torch.cuda.device_count() AssertionError

I've got same error when train the model.

  1. I've checked the 'torch.cuda.**' and there's nothing wrong happend. ONLY at this happend. 2.I also have right cuda version

Any helps?

USED: cd <ByteTrack_HOME> python3 tools/train.py -f exps/example/mot/yolox_x_ablation.py -d 8 -b 48 --fp16 -o -c pretrained/yolox_x.pth

Dev-ori avatar Apr 18 '22 06:04 Dev-ori

Check your machine has GPU OR make sure your pytorch has cuda version

Melikamuliyih avatar Apr 18 '22 06:04 Melikamuliyih

I've had got this problem too, and I had solved by downloading pytorch with cuda version and aslo try the with gpu device 0. instead of -d use -d 0

Melikamuliyih avatar Apr 18 '22 06:04 Melikamuliyih

I've had got this problem too, and I had solved by downloading pytorch with cuda version and aslo try the with gpu device 0. instead of -d use -d 0

Thx a lot. I've tried following you. and I could see the "exp value" table. image but still get an error as bellow. did this happend to you ? image

Dev-ori avatar Apr 18 '22 06:04 Dev-ori

Sorry, I didnt got this

Melikamuliyih avatar Apr 18 '22 06:04 Melikamuliyih

Sorry, I didnt got this

https://github.com/ifzhang/ByteTrack/issues/57

Guess this was the problem. Thx. good day :)

Dev-ori avatar Apr 18 '22 06:04 Dev-ori

Sorry, I didnt got this

#57

Guess this was the problem. Thx. good day :)

Good

But I've got this problem

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

Melikamuliyih avatar Apr 18 '22 06:04 Melikamuliyih

As for my experience, those 'AsserstionError's occured by 'yolox' version or packages. So, I'd solved by deleting yolox and packages. or simply just delelting the whole 'Bytetrack' folder and re-download and re install by the following steps noted at the 'readme.md'.

I guess there could be some collision between install steps.

and beaware that this 'Bytetrack' uses the old version of yolox

https://github.com/Megvii-BaseDetection/YOLOX/tree/0.1.0

Dev-ori avatar Apr 18 '22 07:04 Dev-ori

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

I also ran into this problem, were you able to solve it?

TheMadScientiist avatar Apr 25 '22 16:04 TheMadScientiist

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

I also ran into this problem, were you able to solve it?

If you get warnnings, try to solve them

Melikamuliyih avatar Apr 26 '22 06:04 Melikamuliyih

it is generally the issue of wrong image directoies, you can print out the dir for debugging.

forever208 avatar Jun 10 '22 13:06 forever208

Any other update on Solving this problem? I have tried pytorch with cuda version and it still doesn't work. Any other way round it or should I simply reinstall ByteTrack.

parthmalpathak avatar Jun 27 '22 17:06 parthmalpathak

@parthmalpathak In the dataset directory(../Bytetrack/datasets) , name your folder for your dataset “mot”

TheMadScientiist avatar Jun 27 '22 17:06 TheMadScientiist

@TheMadScientiist just to confirm, the datasets folder already has 'mot' which contains MOT17- train, test and annotations. Apart from that can you tell me where to store mix_det, mix_mot_20_ch and mix_mot_ch? Because I have just kept them as directories along with ETHZ, cityscapes and other datasets Screen Shot 2022-06-27 at 10 29 56 AM

parthmalpathak avatar Jun 27 '22 17:06 parthmalpathak

@parthmalpathak In the ETHZ and cityscapes directories are there train, test, and annotations like the “mot” folder?

TheMadScientiist avatar Jun 27 '22 17:06 TheMadScientiist

datasets |——————mot | └——————train | └——————test └——————crowdhuman | └——————Crowdhuman_train | └——————Crowdhuman_val | └——————annotation_train.odgt | └——————annotation_val.odgt └——————MOT20 | └——————train | └——————test └——————Cityscapes | └——————images | └——————labels_with_ids └——————ETHZ └——————eth01 └——————... └——————eth07

The folders are made the same way as suggested in the README. They have the same content. Each folder has annotations extra when you convert to COCO by running the .py files.

parthmalpathak avatar Jun 27 '22 17:06 parthmalpathak

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

我也遇到了这个问题,请问你解决了吗?

5211314whb avatar Sep 23 '22 01:09 5211314whb

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

请问你解决了吗

5211314whb avatar Sep 23 '22 02:09 5211314whb

I've had got this problem too, and I had solved by downloading pytorch with cuda version and aslo try the with gpu device 0. instead of -d use -d 0

Thx a lot. I've tried following you. and I could see the "exp value" table. image but still get an error as bellow. did this happend to you ? image

l change the d to 0, but l get this problem No such file or directory: 'pretrained/yolox_x.pth' , how to fix it

gyh420 avatar Nov 29 '22 14:11 gyh420

You can create a new folder in your root directory. Name it pretrained, and put yolox_x.pth in it

------------------ 原始邮件 ------------------ 发件人: "ifzhang/ByteTrack" @.>; 发送时间: 2022年11月29日(星期二) 晚上10:26 @.>; 抄送: "指尖@@.@.>; 主题: Re: [ifzhang/ByteTrack] AssertionError (Issue #174)

I've had got this problem too, and I had solved by downloading pytorch with cuda version and aslo try the with gpu device 0. instead of -d use -d 0

Thx a lot. I've tried following you. and I could see the "exp value" table. but still get an error as bellow. did this happend to you ?

l change the d to 0, but l get this problem No such file or directory: 'pretrained/yolox_x.pth' , how to fix it

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

5211314whb avatar Nov 30 '22 01:11 5211314whb

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

请问你解决了吗

hi ,when i run python3 tools/convert_crowdhuman_to_coco.py, l have this question, [Errno 2] No such file or directory: 'datasets/crowdhuman/CrowdHuman_val/273271,c9db000d5146c15.jpg', but l have cheek it, there have the 273271,c9db000d5146c15.jpg, how to fix it?

gyh420 avatar Dec 04 '22 01:12 gyh420

这个没有,我也是这个错误,得问作者

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月4日(星期天) 上午9:01 收件人: @.>; 抄送: "指尖@@.>; @.>; 主题: Re: [ifzhang/ByteTrack] AssertionError (Issue #174)

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

请问你解决了吗

hi ,when i run python3 tools/convert_crowdhuman_to_coco.py, l have this question, [Errno 2] No such file or directory: 'datasets/crowdhuman/CrowdHuman_val/273271,c9db000d5146c15.jpg', but l have cheek it, there have the 273271,c9db000d5146c15.jpg, how to fix it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

5211314whb avatar Dec 04 '22 01:12 5211314whb

这个没有,我也是这个错误,得问作者 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年12月4日(星期天) 上午9:01 收件人: @.>; 抄送: "指尖@@.>; @.>; 主题: Re: [ifzhang/ByteTrack] AssertionError (Issue #174) “yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError 请问你解决了吗 hi ,when i run python3 tools/convert_crowdhuman_to_coco.py, l have this question, [Errno 2] No such file or directory: 'datasets/crowdhuman/CrowdHuman_val/273271,c9db000d5146c15.jpg', but l have cheek it, there have the 273271,c9db000d5146c15.jpg, how to fix it? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

when i run python tools/train.py -f exps/example/mot/yolox_x_ablation.py -d 8 -b 48 --fp16 -o -c pretrained/yolox_x.pth, it assert num_gpu <= torch.cuda.device_count(), any suggestion?

gyh420 avatar Dec 04 '22 06:12 gyh420

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

请问你解决了吗

now, l get the same question,how you fix it ?

gyh420 avatar Dec 04 '22 07:12 gyh420

Sorry, I didnt got this

#57 Guess this was the problem. Thx. good day :)

Good

But I've got this problem

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

l have the same question, how you fix it ?

gyh420 avatar Dec 04 '22 07:12 gyh420

I also have the same problem, which has not been solved. Is there a bug in the original code?

------------------ 原始邮件 ------------------ 发件人: "ifzhang/ByteTrack" @.>; 发送时间: 2022年12月4日(星期天) 下午3:36 @.>; 抄送: "指尖@@.@.>; 主题: Re: [ifzhang/ByteTrack] AssertionError (Issue #174)

Sorry, I didnt got this

#57 Guess this was the problem. Thx. good day :)

Good

But I've got this problem

"yolox/data/datasets/mot.py", line 102, in pull_item assert img is not None AssertionError

l have the same question, how you fix it ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

5211314whb avatar Dec 04 '22 09:12 5211314whb

assert img is not None

assert img is not None how you fix it?

gyh420 avatar Dec 05 '22 08:12 gyh420

“yolox/data/datasets/mot.py”,第 102 行,在 pull_item 中 断言 img 不是 None AssertionError

请问你解决了吗

any result? l have assert img is not None too

gyh420 avatar Dec 05 '22 08:12 gyh420

maybe you can change the command line (e.g. from "python train_net.py --num-gpus 8(this num is too big) " to "python train_net.py --num-gpus 2(the number is up to your num of gpus, I recommand you to rise it from 1)")

silverAugustine avatar Nov 30 '23 06:11 silverAugustine