Comments (10)
It will be very hard to help you with this little information. Could you provide the complete error message?
from yolo_tracking.
self.update(yaml.load(fo.read()))
Using CUDA device0 _CudaDeviceProperties(name='GeForce MX150', total_memory=2002MB)
/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'models.yolo.Model' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'models.yolo.Detect' has changed. you can retrieve the original source code by accessing the object's source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
1/1: 0... success (640x480 at 30.00 FPS).
Traceback (most recent call last):
File "track.py", line 247, in
detect(args)
File "track.py", line 122, in detect
_ = model(img.half() if half else img) if device.type != 'cpu' else None # run once
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 110, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "./yolov5/models/yolo.py", line 130, in forward_once
x = m(x) # run
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 37, in forward
x[i] = self.mi # conv
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr
type(self).name, name))
AttributeError: 'Detect' object has no attribute 'm'
terminate called without an active exception
And pytorch=1.5.0 cuda=10.2 python=3.7
The reason why I use pytorch 1.5.0 is that I can not run original yolov5 when I update my pytorch to 1.6.0
from yolo_tracking.
self.update(yaml.load(fo.read()))
Using CUDA device0 _CudaDeviceProperties(name='GeForce MX150', total_memory=2002MB)/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'models.yolo.Model' has changed. you can retrieve the original source code by accessing the object's source attribute or set
torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. you can retrieve the source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
/home/lyx/anaconda3/lib/python3.7/site-packages/torch/serialization.py:657: SourceChangeWarning: source code of class 'models.yolo.Detect' has changed. you can retrieve the original source code by accessing the object's source attribute or settorch.nn.Module.dump_patches = True
and use the patch tool to revert the changes.
warnings.warn(msg, SourceChangeWarning)
1/1: 0... success (640x480 at 30.00 FPS).Traceback (most recent call last):
File "track.py", line 247, in
detect(args)
File "track.py", line 122, in detect
_ = model(img.half() if half else img) if device.type != 'cpu' else None # run once
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 110, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "./yolov5/models/yolo.py", line 130, in forward_once
x = m(x) # run
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 37, in forward
x[i] = self.mi # conv
File "/home/lyx/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 594, in getattr
type(self).name, name))
AttributeError: 'Detect' object has no attribute 'm'
terminate called without an active exceptionAnd pytorch=1.5.0 cuda=10.2 python=3.7
The reason why I use pytorch 1.5.0 is that I can not run original yolov5 when I update my pytorch to 1.6.0
And I use python3.8 and pytorch 1.6.0, I met the same problem.
from yolo_tracking.
同样遇到这个问题,有人解决了吗?
from yolo_tracking.
Traceback (most recent call last):
File "track.py", line 247, in
detect(args)
File "track.py", line 122, in detect
_ = model(img.half() if half else img) if device.type != 'cpu' else None # run once
File "/home/jie311/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 100, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "./yolov5/models/yolo.py", line 120, in forward_once
x = m(x) # run
File "/home/jie311/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in call
result = self.forward(*input, **kwargs)
File "./yolov5/models/yolo.py", line 27, in forward
x[i] = self.mi # conv
File "/home/jie311/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 591, in getattr
type(self).name, name))
AttributeError: 'Detect' object has no attribute 'm'
I encountered this problem, too. Need I upgrade my pytorch from 1.2.0 to 1.6.0 ? Or is it about my python version 3.6.10 ?Thanks @mikel-brostrom
请问有哪位大佬解决了这个问题么?可以的话交流一下谢谢!
from yolo_tracking.
Make sure that ALL the requirements are fulfilled: Python >= 3.8, PyTorch >= 1.6 etc.
Then make sure both your code and models are up to date. If in doubt, simply start from a clean slate: reclone the repo and download new weights
from yolo_tracking.
For more info on this specific error you could check:
from yolo_tracking.
For more info on this specific error you could check:
yes solve it Thx
from yolo_tracking.
I just updated yolov5. That may help as well
from yolo_tracking.
I encountered this same error myself yesterday while updating yolov5. I updated the code but didn't update the models, so... #10 (comment)
from yolo_tracking.
Related Issues (20)
- DeepOCSORT example fails with 'AttributeError: 'str' object has no attribute 'type'' HOT 9
- Dockerfile reference incorrect git branch HOT 2
- OCSort non-default max_age error HOT 7
- How to track with a modified yoloV8 detection model? HOT 11
- How to evaluate the VisDrone dataset using YOLOv5 and ByteTrack HOT 3
- How to use YOLOX as the detector for evaluation? HOT 5
- IndexError for HybridSort tracker HOT 6
- Supported GPU version is not HOT 3
- How to reset the tracking id for ByteTracker HOT 1
- Possibility of reducing the acquisition of embeddings of objects. HOT 7
- 运行val.py HOT 1
- Illegal instruction (core dumped) for BoTSORT HOT 4
- ModuleNotFoundError: No module named 'ultralytics.nn.modules.conv'; 'ultralytics.nn.modules' is not a package.
- frame count bug still exists HOT 1
- AttributeError: 'Segment' object has no attribute 'detect' HOT 2
- Question about the initialization of the process uncertainty matrix (`Q`) in `ocsort.py` HOT 2
- Tracking id for ByteTracker not being able to reset HOT 5
- Question on Color Conversion in DeepOCSort During Tracking HOT 1
- How to train custom Reid dataset from scratch on yolo_tracking? HOT 3
- Inquiry regarding liscence HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolo_tracking.