yolov5_anime
yolov5_anime copied to clipboard
Error trying to run the code.
Following the exact instructions, here is what I get:
╭─arthur at aquarelle in ~/dev/ai/yolov5_anime on master✘✘✘ 23-12-02 - 2:56:53
╰─⠠⠵ python detect.py --weights weights/yolov5x_anime.pt --source ../manga/data/source/alita/Battle\ Angel\ Alita\ v02/Volume\ 2\ -\ Tears\ Of\ An\ Angel --output /ram/test
Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.4, device='', img_size=640, iou_thres=0.5, output='/ram/test', save_txt=False, source='../manga/data/source/alita/Battle Angel Alita v02/Volume 2 - Tears Of An Angel', update=False, view_img=False, weights=['weights/yolov5x_anime.pt'])
/home/arthur/.pyenv/versions/3.7.17/lib/python3.7/site-packages/torch/cuda/__init__.py:88: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Using CPU
Fusing layers... Model Summary: 284 layers, 8.83906e+07 parameters, 8.45317e+07 gradients
image 1/612 /home/arthur/dev/ai/manga/data/source/alita/Battle Angel Alita v02/Volume 2 - Tears Of An Angel/BA-02-007-rotated.jpg: Traceback (most recent call last):
File "detect.py", line 171, in <module>
detect()
File "detect.py", line 72, in detect
pred = model(img, augment=opt.augment)[0]
File "/home/arthur/.pyenv/versions/3.7.17/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/arthur/dev/ai/yolov5_anime/models/yolo.py", line 109, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/home/arthur/dev/ai/yolov5_anime/models/yolo.py", line 129, in forward_once
x = m(x) # run
File "/home/arthur/.pyenv/versions/3.7.17/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/arthur/.pyenv/versions/3.7.17/lib/python3.7/site-packages/torch/nn/modules/upsampling.py", line 157, in forward
recompute_scale_factor=self.recompute_scale_factor)
File "/home/arthur/.pyenv/versions/3.7.17/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1270, in __getattr__
type(self).__name__, name))
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
╭─arthur at aquarelle in ~/dev/ai/yolov5_anime on master✘✘✘ 23-12-02 - 2:57:35
╰─⠠⠵
Am I doing something wrong? What should I do to fix this?
Thanks!