android-demo-app
android-demo-app copied to clipboard
AttributeError: Can't get attribute 'C3' on <module 'models.common' from './models/common.py'
Hello! I run models/export.py from https://github.com/jeffxtang/yolov5 with the supposed changes and I get the error above. I have trained a binary custom yolov5 model with yolov5s.yaml. Any suggestions?
Which torch and torchvision versions are you using?
Torch = 1.9.0+cu102 Torchvision = 0.10.0+cu102
I noticed that it exports yolov5s.pt but not my best.pt
Also my model is trained with --img 640 as yolov5s, but in android (if I export with ultrlytics export method) I get this:
2021-07-12 21:50:12.954 31189-31230/org.pytorch.demo.objectdetection E/Perf: Fail to get file list org.pytorch.demo.objectdetection
2021-07-12 21:50:12.954 31189-31230/org.pytorch.demo.objectdetection E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2021-07-12 21:50:12.954 31189-31230/org.pytorch.demo.objectdetection E/Perf: Fail to get file list org.pytorch.demo.objectdetection
2021-07-12 21:50:12.954 31189-31230/org.pytorch.demo.objectdetection E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2021-07-12 21:50:13.058 31189-31189/org.pytorch.demo.objectdetection E/objectdetectio: Invalid ID 0x00000000.```
I found my solution. Tell me if it's correct. I used ultralytics/yolov5 and added the export.py in the yolov5/models directory. Still in android studio I receive the same error :/
same error there :/