Object Detection with Yolov8 using Jetson Nano

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 133

  • @CodeWithAarohi
    @CodeWithAarohi  Год назад +19

    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

    • @gbox3d
      @gbox3d Год назад +2

      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!

  • @gbox3d
    @gbox3d Год назад +1

    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!

  • @hajerbettayeb8761
    @hajerbettayeb8761 Год назад +2

    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.

  • @Sunil-ez1hx
    @Sunil-ez1hx Год назад

    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 👏👍

  • @Bwajster
    @Bwajster 4 месяца назад +1

    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.

  • @mahsadehghan5419
    @mahsadehghan5419 9 месяцев назад +1

    Hi and many thanks. what is the maximum fps of this setup?

  • @ollydsouza
    @ollydsouza Год назад

    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

  • @patrickjane419
    @patrickjane419 8 месяцев назад +1

    Does this method use the GPU on the jetson nano? Or does it stick with just the CPU?

  • @saipraneeth603
    @saipraneeth603 9 месяцев назад +1

    i have an application of autonomous driving it is to detect the vehicles now how can i import that model into this project

  • @bheemkill4282
    @bheemkill4282 Год назад +1

    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

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Are you installing pytorch and torch vision with cuda or without cuda

    • @bheemkill4282
      @bheemkill4282 Год назад +5

      ​@@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

    • @br2245
      @br2245 8 месяцев назад

      Cuda only supports with python 3.6.9, now only way to access use tensorrt, even yolo v8 also

  • @ameer-alahmadi
    @ameer-alahmadi 11 месяцев назад

    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.

  • @bsuhaib
    @bsuhaib 11 месяцев назад

    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.

    • @bsskkkim5469
      @bsskkkim5469 11 месяцев назад

      why dont you downgrade numpy version?

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      Yes, I installed torch outside the ultralytics. I didn't downgraded the numpy because the current version was not throwing any error 🙂

    • @bsuhaib
      @bsuhaib 11 месяцев назад +1

      Thankyou.
      Installing downgraded torch outside ultralytics solved the issue.
      Thanks again

    • @bsskkkim5469
      @bsskkkim5469 11 месяцев назад

      @@bsuhaib May U help me how u solved the issue that is not installed ultralytics in jetpack4.6, python3.6.9?

    • @bsuhaib
      @bsuhaib 11 месяцев назад

      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

  • @user-lz1rc6gk6r
    @user-lz1rc6gk6r 11 месяцев назад

    Thanks for helpful content! Is it work on tx2? I have jetson tx2 now. Thanks.

  • @YigalBZ
    @YigalBZ Год назад

    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?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад +1

      Just write 0 at the place of image . It will pick the first camera connected with Jetson Nano.

  • @dpool6326
    @dpool6326 5 месяцев назад

    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?

    • @CodeWithAarohi
      @CodeWithAarohi  5 месяцев назад

      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

  • @tahmidhasansakib5887
    @tahmidhasansakib5887 2 месяца назад

    Where is the codebase?
    Can you please share the link of a github repo of the files and model you used for this tutorial?

  • @harharmahadev8624
    @harharmahadev8624 Год назад

    Once again great explanation.....

  • @49_jaypandya40
    @49_jaypandya40 Год назад +1

    The video is amazing mam can you make some more object detection and tracking video tutorial in jetson nano

  • @NMISPRAGATHIACHARYA
    @NMISPRAGATHIACHARYA 6 месяцев назад

    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 ?

    • @CodeWithAarohi
      @CodeWithAarohi  6 месяцев назад

      THis folder is created by me where I have pasted the codes

  • @edtechaz
    @edtechaz 9 месяцев назад

    Thank you for the useful video

  • @nhanduong5917
    @nhanduong5917 10 месяцев назад

    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!

  • @sig_pima
    @sig_pima 4 месяца назад

    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

    • @CodeWithAarohi
      @CodeWithAarohi  4 месяца назад

      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.

  • @foodboinghiemtuc
    @foodboinghiemtuc 6 месяцев назад

    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?

    • @CodeWithAarohi
      @CodeWithAarohi  6 месяцев назад

      You can use that as well but why to install 1 extra software when you can do that directly using pip.

  • @spes9850401
    @spes9850401 9 месяцев назад +1

    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

    • @MatheusSilvaYouTube
      @MatheusSilvaYouTube 9 месяцев назад +1

      you found a solution for thi problem, I'm with this problem too

    • @spes9850401
      @spes9850401 9 месяцев назад +1

      @@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.

    • @MatheusSilvaYouTube
      @MatheusSilvaYouTube 9 месяцев назад

      @@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?

    • @MatheusSilvaYouTube
      @MatheusSilvaYouTube 9 месяцев назад

      @@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?

  • @iohanaa.6905
    @iohanaa.6905 8 месяцев назад +1

    Where did you find the folder "python_examples"?

    • @CodeWithAarohi
      @CodeWithAarohi  8 месяцев назад

      I created this folder myself and then created different python scripts in it.

    • @NMISPRAGATHIACHARYA
      @NMISPRAGATHIACHARYA 6 месяцев назад

      @@CodeWithAarohi These scripts are to be written by us as per our requirement?

  • @alisufyan6784
    @alisufyan6784 4 месяца назад

    is the noise behind background is noise from IDS or IPS of server ?

  • @Rajendra-r2k
    @Rajendra-r2k 10 месяцев назад

    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?

  • @randhirsinghmehra5443
    @randhirsinghmehra5443 Год назад

    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

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      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)

  • @112fkdldjs
    @112fkdldjs Год назад +1

    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

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Jetpack 5.0.2 won’t support nano. JetPack 4.6 supports Nano.

    • @112fkdldjs
      @112fkdldjs Год назад

      @@CodeWithAarohi Then, is there way to run yolov8 with gpu in jetson nano developer kit?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      @@112fkdldjs Not sure, not tried yet!

    • @112fkdldjs
      @112fkdldjs Год назад

      @@CodeWithAarohi OK Thank you..!

    • @112fkdldjs
      @112fkdldjs Год назад

      @@CodeWithAarohi Thank you for great videos.

  • @NajwaBelarbi-s9c
    @NajwaBelarbi-s9c Год назад

    thank you for the video! is it possible to explain how to run a YOLOV8 application inside a Docker?

  • @kuladeepakkarapaka7794
    @kuladeepakkarapaka7794 Месяц назад

    does jetpack 4.6.1 supported pytorch version (1.10.0) works with python 3.8.3?

  • @chakradharpaniki
    @chakradharpaniki 5 месяцев назад

    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
      @CodeWithAarohi  5 месяцев назад

      You can skip using jupyter notebook. Just create a file with .py extension, apste the code in it. Run it from terminal

    • @chakradharpaniki
      @chakradharpaniki 5 месяцев назад

      @@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

  • @hayhayhayheeyaa
    @hayhayhayheeyaa 9 месяцев назад

    Thank you for sharing.. Where i can find the code?

  • @ayaannabi7083
    @ayaannabi7083 5 месяцев назад

    can you please make a video of how to install torch with cuda on jetson nano with python 3.8

  • @sujithN-nn4lh
    @sujithN-nn4lh 5 месяцев назад

    mam, we created the env with python3.8. can we install opencv in that env using ur ref video

    • @CodeWithAarohi
      @CodeWithAarohi  5 месяцев назад

      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 :)

  • @user-xr5rq6ci6q
    @user-xr5rq6ci6q 2 месяца назад

    how can you run the model in a camera ? please answer me I am stuck.Thank you in advance

    • @CodeWithAarohi
      @CodeWithAarohi  2 месяца назад

      Check this playlist- here I have explained it: ruclips.net/p/PLv8Cp2NvcY8AkXRldCAYCvFxRUs0h5JJF

  • @glitche9515
    @glitche9515 Год назад

    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

  • @nhatpham5797
    @nhatpham5797 4 месяца назад

    Hello, can you install the pyrealsense2 lib in venv 3.8.12? thank you

  • @vishnusudheer6049
    @vishnusudheer6049 Год назад

    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
      @CodeWithAarohi  Год назад

      sudo apt-get update
      sudo apt-get install python3-pip libssl-dev

    • @vishnusudheer6049
      @vishnusudheer6049 Год назад

      @@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

  • @NanoCreator
    @NanoCreator Год назад +1

    Can yolo8 be installed on jetson nano 2g? Will it run normally?

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      I never tried on jetson nano 2g but I think it will work. Processing will be slow but it work.

  • @akashpatel9884
    @akashpatel9884 8 месяцев назад

    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

    • @CodeWithAarohi
      @CodeWithAarohi  7 месяцев назад

      I have to try it first. Will let you know once done.

  • @suryamohithmaddi2
    @suryamohithmaddi2 Год назад

    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

    • @CodeWithAarohi
      @CodeWithAarohi  Год назад

      Convert your model to TensorRT format and then use.

    • @suryamohithmaddi2
      @suryamohithmaddi2 Год назад

      @@CodeWithAarohi mam can you explain or give reference please? is there any video?

  • @kiennguyenbao4231
    @kiennguyenbao4231 4 месяца назад

    When i run yolov8. I had a error “illegal instruction (core dumped). So how can i fix it? Please help me

    • @CodeWithAarohi
      @CodeWithAarohi  4 месяца назад

      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

  • @香腸金歡喜
    @香腸金歡喜 3 месяца назад

    Can it also work on Jetson Xavier NX?

  • @nhatpham5797
    @nhatpham5797 4 месяца назад

    Hello, can you install PyQt5 in Python version 3.8.12 on Jetson Nano, i cant install it, can you help me :(

  • @synhing
    @synhing 9 месяцев назад

    非常感谢!

  • @kenpjohnson267
    @kenpjohnson267 7 месяцев назад

    how can i use the gpu for detection in real time applications. cpu is too slow?

  • @alexbattikha
    @alexbattikha 10 месяцев назад

    if my kernel continues to shut down and then tries to reconnect, does that imply I am running into memory issues?

    • @CodeWithAarohi
      @CodeWithAarohi  10 месяцев назад +1

      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.

    • @br2245
      @br2245 10 месяцев назад

      Check power supply , May be chance of over current throttle cpu

    • @alexbattikha
      @alexbattikha 10 месяцев назад

      @@br2245 how do i prevent over current throttle? i’m directly powering with 5V, 4A battery

  • @br2245
    @br2245 8 месяцев назад

    Is Jetson nano support tensorrt engine for yolov8???

    • @br2245
      @br2245 8 месяцев назад

      Yes support

  • @HemaSritaYarlagadda
    @HemaSritaYarlagadda 6 месяцев назад

    Hey, I was told that python3.8 and above would crash jetson nano. Is it true?

    • @CodeWithAarohi
      @CodeWithAarohi  6 месяцев назад +1

      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

    • @陳柏勳-j2l
      @陳柏勳-j2l 6 месяцев назад

      @@CodeWithAarohi Is there a way to solve ? In python 3.8 environment using yolov8 by pytorch's CUDA. (Jetpack:4.6.1) THANKS

  • @ucduyvo4552
    @ucduyvo4552 11 месяцев назад

    how to enable gpu in jestion in oder to faster detection.

    • @CodeWithAarohi
      @CodeWithAarohi  11 месяцев назад

      Check if your pytorch is compiled with cuda. To use gpu, pytorch should be compiled with cuda.

  • @nmkingtw
    @nmkingtw 8 месяцев назад

    without cuda?

  • @arifalbastomi2303
    @arifalbastomi2303 10 месяцев назад

    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

    • @CodeWithAarohi
      @CodeWithAarohi  10 месяцев назад

      I used microSD card of 512GB but you can try with 64gb

    • @arifalbastomi2303
      @arifalbastomi2303 9 месяцев назад

      @@CodeWithAarohi what is your pytorch version? i try to run the function model.predict() error illegal instruction

  • @aparneshshukla6194
    @aparneshshukla6194 Год назад

    Great

  • @randhirsinghmehra5443
    @randhirsinghmehra5443 Год назад

    hello mam