Giter Site home page Giter Site logo

Comments (16)

quicktwit avatar quicktwit commented on August 17, 2024 1

I had the similar issue. Try this comment: Run yolov5 on Jetson Nano

from dockerfile-yolov5-jetson.

okome-git avatar okome-git commented on August 17, 2024 1

It works !
Thank you!!

from dockerfile-yolov5-jetson.

okome-git avatar okome-git commented on August 17, 2024 1

@phongvu0403
It works using "git checkout 91547edec1a33121b3607e8c946e051514182b4f".
But I could not use my custom training weights, because of "_pickle.UnpicklingError" like below,

Namespace(agnostic_nms=False, augment=False, classes=None, conf_thres=0.25, device='', exist_ok=False, hide_conf=False, hide_labels=False, img_size=640, iou_thres=0.45, line_thickness=3, name='exp', nosave=False, project='runs/detect', save_conf=False, save_crop=False, save_txt=False, source='data/images', update=False, view_img=False, weights=['../yolov5_01/my_yolov5s.pt'])
YOLOv5 \U0001f680 v5.0-75-g91547ed torch 1.8.0 CUDA:0 (NVIDIA Tegra X1, 3964.1328125MB)

Traceback (most recent call last):
File "detect.py", line 181, in
detect(opt=opt)
File "detect.py", line 33, in detect
model = attempt_load(weights, map_location=device) # load FP32 model
File "/yolov5/models/experimental.py", line 120, in attempt_load
ckpt = torch.load(w, map_location=map_location) # load
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 593, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 762, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '-'.

from dockerfile-yolov5-jetson.

phongvu0403 avatar phongvu0403 commented on August 17, 2024 1

@okome-git
I modified the Dockerfile following the author's instructions. However, there is 1 error here:

Step 15/18 : RUN git clone https://github.com/ultralytics/yolov5.git
---> Running in 0fd30920640d
Cloning into 'yolov5'...
Removing intermediate container 0fd30920640d
---> e70d45f62147
Step 16/18 : RUN git checkout 91547edec1a33121b3607e8c946e051514182b4f
---> Running in 08ab50a200dc
fatal: not a git repository (or any of the parent directories): .git
The command '/bin/sh -c git checkout 91547edec1a33121b3607e8c946e051514182b4f' returned a non-zero code: 128

Can you help me fixed this problem?
Thank you!

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

I think your jetpack should be updated to 4.5 or higher.
Try it!

from dockerfile-yolov5-jetson.

okome-git avatar okome-git commented on August 17, 2024

I updated to jetpack 4.5 today.
And, it didn't not work...
There was same issue
"AssertionError: Python 3.7.0 required by YOLOv5, but Python 3.6.9 is currently installed"

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

Ok, I'd like to confirm this weekend.

from dockerfile-yolov5-jetson.

okome-git avatar okome-git commented on August 17, 2024

Thanks !!

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

recent commits at yolov5, ultralytics/yolov5#3088, requires python3.7 or higher.
I'd like to fix this issue. thanks.

from dockerfile-yolov5-jetson.

okome-git avatar okome-git commented on August 17, 2024

Thank you for your kindness !

Do you know which commit of yolov5 is suitable for jetpack 4.5 ?

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

@okome-git
before ultralytics/yolov5#3088, I think 91547edec1a33121b3607e8c946e051514182b4f can be used, like this:

diff --git a/Dockerfile b/Dockerfile
index 3b46f20..8dfe8e4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,5 +19,6 @@ RUN git clone --recursive https://github.com/skvark/opencv-python.git
 RUN python3 -m pip install --upgrade pip
 RUN cd opencv-python && python3 -m pip wheel . --verbose && find . -name "opencv_python*.whl" | xargs python3 -m pip install
 RUN git clone https://github.com/ultralytics/yolov5.git
+RUN git checkout 91547edec1a33121b3607e8c946e051514182b4f
 RUN cd yolov5 && python3 -m pip install -r requirements.txt
 WORKDIR /yolov5

from dockerfile-yolov5-jetson.

phongvu0403 avatar phongvu0403 commented on August 17, 2024

Hello, I have same issue "AssertionError: Python 3.7.0 required by YOLOv5, but Python 3.6.9 is currently installed". I installed jetpack 4.5.1. In my Jetson Nano, Python version default is 3.6.9 then I installed Python 3.7.5 and I point python3 to python3.7. So when I type "python3 --version", terminal show "python 3.7.5". But this problem still exists.
Can you help me?
Thank advance

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

Currently #8 (comment) is the only workaround for this issue.
Even if you install python3.7 on the docker environment, pytorch can not be worked.

from dockerfile-yolov5-jetson.

phongvu0403 avatar phongvu0403 commented on August 17, 2024

I think you should set cd yolov5 before git checkout 91547edec1a33121b3607e8c946e051514182b4f.

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

workaround is add at c46325b
and default branch is changed to war-python36, since this is a workaround, not a solution.
please fetch and change your branch to war-python36.

from dockerfile-yolov5-jetson.

otamajakusi avatar otamajakusi commented on August 17, 2024

3c8e946 supports python3.8 and default branch has been changed to main.
In this commit, pre-build pytorch binary is used, which was build with https://github.com/otamajakusi/dockerfile-pytorch-build-jetson repo.
thanks.

from dockerfile-yolov5-jetson.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.