Steps for python 3.8 installation: sudo apt update sudo apt upgrade sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev libc6-dev Download the Python source code for version 3.8 from the official Python website. You can use the following command to download it directly to your Jetson Nano: wget www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz Extract the downloaded archive by running the following command: tar -xf Python-3.8.12.tar.xz cd Python-3.8.12 Configure the build process: ./configure --enable-optimizations
Build Python: make -j4 Once the compilation is complete, you can install Python by running the following command: sudo make altinstall python3.8 --version That's it! You have successfully installed Python 3.8 on your Jetson Nano. Now come out from python3.8 folder and create a separate environment using python 3.8 python3.8 -m venv myenv source myenv/bin/activate
Thank you for the detailed steps on installing Python 3.8. It's worth mentioning that Jetson Nano already comes with a pre-installed distribution of Python 3.8, so there is no need to build it from source. This pre-installed version is readily available and can be accessed by simply running the python3.8 command. Installing Python from source can be a time-consuming process and might not be necessary in this case. However, I appreciate your effort in providing the instructions for those who might prefer building Python from source for specific reasons. Keep up the good work!
Thank you for the informative post! I found it helpful to learn how to run YOLOv8 on the Jetson Nano. I was wondering if there are any plans to publish a post about utilizing hardware acceleration for improved performance on the Jetson Nano. It would be great to explore the potential of leveraging CUDA and cuDNN to optimize the execution of YOLOv8. Looking forward to more insightful content like this!
Thank you for sharing. I have question about results of YOLOv8 model , after the training of the model it results in a 3-dimensional confusion matrix taking the background as a class knowing that I have a binary classification my project is classification of preforms whether it is defect or not. What can be the raisaon of appearance of this class "backgroud" and how I can solve it ? if you help me I would be grateful.
Hello Ma’am Your AI and Data Science content is consistently impressive! Thanks for making complex concepts so accessible. Keep up the great work! 🚀 #ArtificialIntelligence #DataScience #ImpressiveContent 👏👍
While I was trying to train the yolov8 model, I get an error: OSError: [Errno 12] Cannot Allocate Memory. Please help me resolve this. I'm training the yolov8 model on VS Code.
Thanks you - very good presentation. Have you tried collecting "detection' (of features selected) results in an excel database using event time and other class tags? For example 2:23pm car detected "other features", etc
Came from your yolov5 video.. because of no module named ultralytics....but now after doing all that said in this video, the torch and torchvision versions are not compatible... I even tried different versions but it is saying not available for this platform kind off... jetpack version is 4.6....please help
@@CodeWithAarohiI just installed in the same way u did.. python 3.8....if I use python 3.6 which is default, then it says cuda available..but when I use virtual environment with py 3.8 it is saying cuda not available...so I even tried to install torch and torchvision like the same way u did for yolov5 video for this new python 3.8 in virtual environment...but it says torch version is not compatible with this platform.... please help me
Thanks Aarohi for your great and useful explanations. But can you please show me how to use the yolov8 edgetpu with raspberry pi and coral usb accelerator. Thanks.
Thanks Aarohi, it is very helpful. But I am getting Illegal Instructions( core dumped) error when I am passing the image through the model. What is the version of torch and torch vision you installed. Did you install it outside ultralytics.
Ultralytics required Python 3.8 as mentioned in the video as well. But while installing ultralytics it will install torch of latest version which was giving me conflict while I was passing the input through the model. By installing torch of 1.8.0 version the issue got resolved
Video was very helpful, but the pytorch version comes with ultrytics for python3.8 does not support cuda. Therfore the detection run at very low fps. Any suggesions?
I was not able to install pytorch with cuda compatibility on python 3.8 and also tried various ways to run ultralytics on python 3.6 but not successful. So no suggestions
While opening the jupyter notebook I don't have a folder named as python examples. Is it explicitly written by you or when typed jupyter notebook on the command prompt it is loaded automatically ?
Hello, I always see the response "The kernel for Untitled.ipynb appears to have died. It will restart automatically." whenever I run my program on the Jupyter. Could you tell me how to fix it? Thank you!
In your PyTorch installation on Jetson Nano video, you only use Python 3.6. However, in this video, you are using Ultralytics with Python 3.8. How can I install Torch with GPU support? Thank you
Jetson Nano comes with Python 3.6 by default, but to run Ultralytics with GPU support, Python 3.8 is required, along with PyTorch compiled with CUDA. Even if you manage to install Python 3.8 on the Jetson Nano, you will encounter difficulties when trying to install PyTorch with CUDA support. If you want to run YOLOv8 on the Jetson Nano, you can install the CPU-compiled version of PyTorch, and it will work. In my view, compiling PyTorch with CUDA is not feasible.
Why do I keep getting this error Illegal instruction (core dumped) I did some research and added export OPENBLAS_CORETYPE=ARMV8 to my .bashrc However, this error keeps showing up. Can anyone help me pls
@@MatheusSilvaRUclips Some package has dependency issue, I frogot if it's numpy or pytorch, and has to be built from source. My suggestion is: don't waste time on solving those dependency issues, just switch to Jetson Orin Nano. Nvidia abandoned Jetson Nano a long time ago.
@@spes9850401 Well, I installed all the packages like opencv and pytorch on python 3.6.9, but when i installed python 3.8 and i create a virtualenv and installed ultralytics for yolov8, it got the newest versions of opencv and pytorch, now how can i get the oldest versions that was on python 3.6.9 virtualenv?
@@spes9850401 Well, I installed all the packages like opencv and pytorch on python 3.6.9, but when i installed python 3.8 and i create a virtualenv and installed ultralytics for yolov8, it got the newest versions of opencv and pytorch, now how can i get the oldest versions that was on python 3.6.9 virtualenv?
which linux version have you installed? Because i have installed 18.04 in P3450 but i m failing. Can you please help me with whether we can run the object tracking with GPU enabled? And can you also help me whether i can install the latest linux version in this board with compatible version of jetpack as well?
i trained a yolov8 model on my dataset for an smart attendance system(with live camera feed), the model is running fine and the prediction of the person is above good,but i am unable to export the detected person name
I have problem in yolov8 running from cuda. ultralytics runs in python 3.8 but, pytorch can be installed in jetpack 4.x only(from your lecture) So I am going to install jetpack 5.x and follow your video by install opencv and etc(lecture 1, 2, 3) and would I have no problem? thank you
i am following the same porcess as you said but when i open the jupyter notebook it is not asking password for keyring and the python example folder is missing in that when i open the jupyter notebook and i'm getting the error as CAN'T INTIALIZE NVRM CHANNEL what may be the issue? please reply for this as this issue is unsolved for many people
@@CodeWithAarohi I tried to run the python file in terminal but i am getting error like "FileNotFoundError: test/1.jpg does not exist" if possible please share the python example folder
I am not sure. You can try. It might work. The steps I prepared to install opencv is for the default python version. You can try those steps on python3.8 in order to know if it works. Also, let me know if it works :)
mam im unable to give CSI camera as my source i tried giving source = 0 its trying to access usb camera youve implemented CSI usage with yolov5 can you please help me with yolov8
Ma'am can you tell me how i can train a custom object detection using terminal of jetson nano and yolo v8 instead of using jupyter notebook. Mam whenever i try to do pip install ultralytics it is saying cant connect to https url since ssl module is not available. How can i fix this
@@CodeWithAarohi mam it is still showing ssl module not available. Pip is configured with locations that require TLS/SSL, however the ssl module in python is not available. I ran the commands inside the environment I made. Can you please help
while using the webcam, the live video is slow and get struck..i think its due to the run on the CPU,can we run using the GPUs if so how madam? please explain the steps
This error typically occurs when the CPU encounters an instruction it cannot execute. This issue can arise due to various reasons, such as incompatibility between the software and hardware or problems with the installed libraries. sudo apt-get update sudo apt-get upgrade Install the Correct Version of PyTorch and CUDA
If your kernel frequently shuts down and tries to reconnect, it is likely due to memory issues, often caused by running memory-intensive tasks or having insufficient RAM for the demands of your processes. Try to reduce the batch size. Also you can use the images with smaller size.
As you can see in this tutorial that I have installed the python 3.8. So, if you do it carefully then it will not crash but I was unsuccessful to run torch with cuda compatibility on python3.8
hi, its very helpfull. i'm try to install to my jetson nano with 16GB disk, i'm running out of space. is your jetson nano also 16GB? or maybe you have any suggestion to solve my problem. Thanks
Steps for python 3.8 installation:
sudo apt update
sudo apt upgrade
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev libffi-dev libc6-dev
Download the Python source code for version 3.8 from the official Python website. You can use the following command to download it directly to your Jetson Nano:
wget www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz
Extract the downloaded archive by running the following command:
tar -xf Python-3.8.12.tar.xz
cd Python-3.8.12
Configure the build process:
./configure --enable-optimizations
Build Python:
make -j4
Once the compilation is complete, you can install Python by running the following command:
sudo make altinstall
python3.8 --version
That's it! You have successfully installed Python 3.8 on your Jetson Nano.
Now come out from python3.8 folder and create a separate environment using python 3.8
python3.8 -m venv myenv
source myenv/bin/activate
Thank you for the detailed steps on installing Python 3.8. It's worth mentioning that Jetson Nano already comes with a pre-installed distribution of Python 3.8, so there is no need to build it from source. This pre-installed version is readily available and can be accessed by simply running the python3.8 command.
Installing Python from source can be a time-consuming process and might not be necessary in this case. However, I appreciate your effort in providing the instructions for those who might prefer building Python from source for specific reasons. Keep up the good work!
Thank you for the informative post! I found it helpful to learn how to run YOLOv8 on the Jetson Nano. I was wondering if there are any plans to publish a post about utilizing hardware acceleration for improved performance on the Jetson Nano. It would be great to explore the potential of leveraging CUDA and cuDNN to optimize the execution of YOLOv8. Looking forward to more insightful content like this!
I will try
Thank you for sharing. I have question about results of YOLOv8 model , after the training of the model it results in a 3-dimensional confusion matrix taking the background as a class knowing that I have a binary classification my project is classification of preforms whether it is defect or not. What can be the raisaon of appearance of this class "backgroud" and how I can solve it ? if you help me I would be grateful.
Hello Ma’am
Your AI and Data Science content is consistently impressive! Thanks for making complex concepts so accessible. Keep up the great work! 🚀 #ArtificialIntelligence #DataScience #ImpressiveContent 👏👍
Thanks for your kind words
While I was trying to train the yolov8 model, I get an error: OSError: [Errno 12] Cannot Allocate Memory. Please help me resolve this. I'm training the yolov8 model on VS Code.
Hi and many thanks. what is the maximum fps of this setup?
Thanks you - very good presentation. Have you tried collecting "detection' (of features selected) results in an excel database using event time and other class tags? For example 2:23pm car detected "other features", etc
Not yet!
Does this method use the GPU on the jetson nano? Or does it stick with just the CPU?
CPU
i have an application of autonomous driving it is to detect the vehicles now how can i import that model into this project
Came from your yolov5 video.. because of no module named ultralytics....but now after doing all that said in this video, the torch and torchvision versions are not compatible... I even tried different versions but it is saying not available for this platform kind off... jetpack version is 4.6....please help
Are you installing pytorch and torch vision with cuda or without cuda
@@CodeWithAarohiI just installed in the same way u did.. python 3.8....if I use python 3.6 which is default, then it says cuda available..but when I use virtual environment with py 3.8 it is saying cuda not available...so I even tried to install torch and torchvision like the same way u did for yolov5 video for this new python 3.8 in virtual environment...but it says torch version is not compatible with this platform.... please help me
Cuda only supports with python 3.6.9, now only way to access use tensorrt, even yolo v8 also
Thanks Aarohi for your great and useful explanations. But can you please show me how to use the yolov8 edgetpu with raspberry pi and coral usb accelerator. Thanks.
Thanks Aarohi, it is very helpful.
But I am getting Illegal Instructions( core dumped) error when I am passing the image through the model.
What is the version of torch and torch vision you installed. Did you install it outside ultralytics.
why dont you downgrade numpy version?
Yes, I installed torch outside the ultralytics. I didn't downgraded the numpy because the current version was not throwing any error 🙂
Thankyou.
Installing downgraded torch outside ultralytics solved the issue.
Thanks again
@@bsuhaib May U help me how u solved the issue that is not installed ultralytics in jetpack4.6, python3.6.9?
Ultralytics required Python 3.8 as mentioned in the video as well.
But while installing ultralytics it will install torch of latest version which was giving me conflict while I was passing the input through the model.
By installing torch of 1.8.0 version
the issue got resolved
Thanks for helpful content! Is it work on tx2? I have jetson tx2 now. Thanks.
It should
Thanks for the good and clear video. Can you please show a video on how to run it on Jetson Nano with real-time camera input video?
Just write 0 at the place of image . It will pick the first camera connected with Jetson Nano.
Video was very helpful, but the pytorch version comes with ultrytics for python3.8 does not support cuda. Therfore the detection run at very low fps. Any suggesions?
I was not able to install pytorch with cuda compatibility on python 3.8 and also tried various ways to run ultralytics on python 3.6 but not successful. So no suggestions
Where is the codebase?
Can you please share the link of a github repo of the files and model you used for this tutorial?
Once again great explanation.....
The video is amazing mam can you make some more object detection and tracking video tutorial in jetson nano
Sure
While opening the jupyter notebook I don't have a folder named as python examples. Is it explicitly written by you or when typed jupyter notebook on the command prompt it is loaded automatically ?
THis folder is created by me where I have pasted the codes
Thank you for the useful video
You are welcome
Hello, I always see the response "The kernel for Untitled.ipynb appears to have died. It will restart automatically." whenever I run my program on the Jupyter. Could you tell me how to fix it? Thank you!
In your PyTorch installation on Jetson Nano video, you only use Python 3.6. However, in this video, you are using Ultralytics with Python 3.8. How can I install Torch with GPU support? Thank you
Jetson Nano comes with Python 3.6 by default, but to run Ultralytics with GPU support, Python 3.8 is required, along with PyTorch compiled with CUDA. Even if you manage to install Python 3.8 on the Jetson Nano, you will encounter difficulties when trying to install PyTorch with CUDA support. If you want to run YOLOv8 on the Jetson Nano, you can install the CPU-compiled version of PyTorch, and it will work. In my view, compiling PyTorch with CUDA is not feasible.
Can I ask why we don't use Miniconda to create env? It also allows us to choose the Python version. Also, does this project use GPU?
You can use that as well but why to install 1 extra software when you can do that directly using pip.
Why do I keep getting this error
Illegal instruction (core dumped)
I did some research and added export OPENBLAS_CORETYPE=ARMV8 to my .bashrc
However, this error keeps showing up.
Can anyone help me pls
you found a solution for thi problem, I'm with this problem too
@@MatheusSilvaRUclips Some package has dependency issue, I frogot if it's numpy or pytorch, and has to be built from source. My suggestion is: don't waste time on solving those dependency issues, just switch to Jetson Orin Nano. Nvidia abandoned Jetson Nano a long time ago.
@@spes9850401 Well, I installed all the packages like opencv and pytorch on python 3.6.9, but when i installed python 3.8 and i create a virtualenv and installed ultralytics for yolov8, it got the newest versions of opencv and pytorch, now how can i get the oldest versions that was on python 3.6.9 virtualenv?
@@spes9850401 Well, I installed all the packages like opencv and pytorch on python 3.6.9, but when i installed python 3.8 and i create a virtualenv and installed ultralytics for yolov8, it got the newest versions of opencv and pytorch, now how can i get the oldest versions that was on python 3.6.9 virtualenv?
Where did you find the folder "python_examples"?
I created this folder myself and then created different python scripts in it.
@@CodeWithAarohi These scripts are to be written by us as per our requirement?
is the noise behind background is noise from IDS or IPS of server ?
which linux version have you installed?
Because i have installed 18.04 in P3450 but i m failing. Can you please help me with whether we can run the object tracking with GPU enabled? And can you also help me whether i can install the latest linux version in this board with compatible version of jetpack as well?
i trained a yolov8 model on my dataset for an smart attendance system(with live camera feed), the model is running fine and the prediction of the person is above good,but i am unable to export the detected person name
Try this: # Load a model
model = YOLO("yolov8n.pt") # load a pretrained model (recommended for training)
#results = model("images/person.jpg", save=True)
results = model("images/1.jpg", save=True)
class_names = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush']
for result in results:
boxes = result.boxes # Boxes object for bbox outputs
probs = result.probs # Class probabilities for classification outputs
cls = boxes.cls.tolist() # Convert tensor to list
xyxy = boxes.xyxy
xywh = boxes.xywh # box with xywh format, (N, 4)
conf = boxes.conf
print(cls)
for class_index in cls:
class_name = class_names[int(class_index)]
print("Class:", class_name)
I have problem in yolov8 running from cuda.
ultralytics runs in python 3.8 but, pytorch can be installed in jetpack 4.x only(from your lecture)
So I am going to install jetpack 5.x and follow your video by install opencv and etc(lecture 1, 2, 3) and would I have no problem?
thank you
Jetpack 5.0.2 won’t support nano. JetPack 4.6 supports Nano.
@@CodeWithAarohi Then, is there way to run yolov8 with gpu in jetson nano developer kit?
@@112fkdldjs Not sure, not tried yet!
@@CodeWithAarohi OK Thank you..!
@@CodeWithAarohi Thank you for great videos.
thank you for the video! is it possible to explain how to run a YOLOV8 application inside a Docker?
Yes, soon
does jetpack 4.6.1 supported pytorch version (1.10.0) works with python 3.8.3?
i am following the same porcess as you said but when i open the jupyter notebook it is not asking password for keyring and the python example folder is missing in that when i open the jupyter notebook and i'm getting the error as CAN'T INTIALIZE NVRM CHANNEL
what may be the issue? please reply for this as this issue is unsolved for many people
You can skip using jupyter notebook. Just create a file with .py extension, apste the code in it. Run it from terminal
@@CodeWithAarohi I tried to run the python file in terminal but i am getting error like "FileNotFoundError: test/1.jpg does not exist"
if possible please share the python example folder
Thank you for sharing.. Where i can find the code?
can you please make a video of how to install torch with cuda on jetson nano with python 3.8
Noted!
mam, we created the env with python3.8. can we install opencv in that env using ur ref video
I am not sure. You can try. It might work. The steps I prepared to install opencv is for the default python version. You can try those steps on python3.8 in order to know if it works. Also, let me know if it works :)
how can you run the model in a camera ? please answer me I am stuck.Thank you in advance
Check this playlist- here I have explained it: ruclips.net/p/PLv8Cp2NvcY8AkXRldCAYCvFxRUs0h5JJF
mam im unable to give CSI camera as my source
i tried giving source = 0 its trying to access usb camera
youve implemented CSI usage with yolov5
can you please help me with yolov8
Hello, can you install the pyrealsense2 lib in venv 3.8.12? thank you
I am not sure, I never tried
Ma'am can you tell me how i can train a custom object detection using terminal of jetson nano and yolo v8 instead of using jupyter notebook. Mam whenever i try to do pip install ultralytics it is saying cant connect to https url since ssl module is not available. How can i fix this
sudo apt-get update
sudo apt-get install python3-pip libssl-dev
@@CodeWithAarohi mam it is still showing ssl module not available. Pip is configured with locations that require TLS/SSL, however the ssl module in python is not available. I ran the commands inside the environment I made. Can you please help
Can yolo8 be installed on jetson nano 2g? Will it run normally?
I never tried on jetson nano 2g but I think it will work. Processing will be slow but it work.
How do i inference YoloNas on jetson nano using webcam. I am unable to setup the dependencies that required. Can you tell me how to do it
I have to try it first. Will let you know once done.
while using the webcam, the live video is slow and get struck..i think its due to the run on the CPU,can we run using the GPUs if so how madam? please explain the steps
Convert your model to TensorRT format and then use.
@@CodeWithAarohi mam can you explain or give reference please? is there any video?
When i run yolov8. I had a error “illegal instruction (core dumped). So how can i fix it? Please help me
This error typically occurs when the CPU encounters an instruction it cannot execute. This issue can arise due to various reasons, such as incompatibility between the software and hardware or problems with the installed libraries.
sudo apt-get update
sudo apt-get upgrade
Install the Correct Version of PyTorch and CUDA
Can it also work on Jetson Xavier NX?
Yes
@@CodeWithAarohi thank you!
Hello, can you install PyQt5 in Python version 3.8.12 on Jetson Nano, i cant install it, can you help me :(
I never tried it. I have to check.
非常感谢!
welcome!
how can i use the gpu for detection in real time applications. cpu is too slow?
I will make a video soon.
if my kernel continues to shut down and then tries to reconnect, does that imply I am running into memory issues?
If your kernel frequently shuts down and tries to reconnect, it is likely due to memory issues, often caused by running memory-intensive tasks or having insufficient RAM for the demands of your processes. Try to reduce the batch size. Also you can use the images with smaller size.
Check power supply , May be chance of over current throttle cpu
@@br2245 how do i prevent over current throttle? i’m directly powering with 5V, 4A battery
Is Jetson nano support tensorrt engine for yolov8???
Yes support
Hey, I was told that python3.8 and above would crash jetson nano. Is it true?
As you can see in this tutorial that I have installed the python 3.8. So, if you do it carefully then it will not crash but I was unsuccessful to run torch with cuda compatibility on python3.8
@@CodeWithAarohi Is there a way to solve ? In python 3.8 environment using yolov8 by pytorch's CUDA. (Jetpack:4.6.1) THANKS
how to enable gpu in jestion in oder to faster detection.
Check if your pytorch is compiled with cuda. To use gpu, pytorch should be compiled with cuda.
without cuda?
Yes, without cuda
hi, its very helpfull.
i'm try to install to my jetson nano with 16GB disk,
i'm running out of space.
is your jetson nano also 16GB?
or maybe you have any suggestion to solve my problem.
Thanks
I used microSD card of 512GB but you can try with 64gb
@@CodeWithAarohi what is your pytorch version? i try to run the function model.predict() error illegal instruction
Great
Thank you!
hello mam