YOLOX
YOLOX copied to clipboard
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
I Follow the Github step to inference picture and I didn't modify the code.
When I type 'python tools/demo.py image -f exps/default/yolox_s.py -c preModels/yolox_s.pth --path assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 640 --save_result --device gpu' in terminal
The log shows below:
Traceback (most recent call last):
File "tools/demo.py", line 320, in
Finally I run the code on my another PC, it can work.
Could you plz provide more environment info like your torch version, git commit hash and so on? Are you training COCO dataset?
My conda environment shows below: pytorch 1.10.2 py3.8_cuda10.2_cudnn7.6.5_0 pytorch python 3.8.5 torchvision 0.11.3 py38_cu102 pytorch NO, I only used pretrain weight (yolox-m.pth) to inference my video.
My commit step shows below: git clone https://github.com/Megvii-BaseDetection/YOLOX.git
cd YOLOX
conda create -n torchYolo python=3.8.5
conda activate torchYolo
pip3 install -U pip && pip3 install -r requirements.txt
python3 setup.py develop
pip3 install cython
pip install pycocotools
python tools/demo.py image -n yolox-s -c preModels/yolox_s.pth --path assets/dog.jpg --conf 0.25 --nms 0.45 --tsize 640 --save_result
您的问题解决了吗 我今天也遇到同样的问题
我後來有解決,不過有點忘了,我當時好像是重新安裝thop