running a python scripts to use deep learning models

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

running a python scripts to use deep learning models

379 Views
si1234
Contributor I

hi, I have trained a yolo model and an ocr model to detect and read something using webcam, in my pc I have a python script that I can run and the script open up the camera and use these models, but now I want to have this on my i.mx 8series board and so I need to install some libraries like ultralytics, but I don't know how ? I am a beginner and I have no idea what should I do and I wanted to know that if linux is installed on the board can I simply transfer the folder of my project into the board and run the python scripts?

0 Kudos
Reply
3 Replies

338 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @si1234 

I hope you are doing very well.

Is your issue trying to install the libraries?

You can connect your board to Ethernet or wifi to a red with internet access and simply run the pip command as follows:

 

$ pip3 install ultralytics

 

You should be able to install the library.

 

Let me know how it was, or clarify your exact issue.

 

Best regards,

Salas.

0 Kudos
Reply

316 Views
si1234
Contributor I
Hi,

Thank you for your response! Yes, my issue is indeed with installing the required libraries. The Python script I am trying to run imports libraries like ultralytics, so I need to have them installed. However, I was informed that I cannot simply use pip install. Instead, I need to include the required libraries before building the Linux image (Yocto Project) for the board—specifically, by having the Python packages in .bb format and integrating them into the image build.

Could you confirm if this is the correct approach, or if there is an alternative way to install the libraries?

Best regards,
0 Kudos
Reply

308 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello,

 

Sometimes pip install works with some libraries, but totally agree that working with Yocto, you should to add those libraries while you are compiling.

You can add your custom layer with all the libraries you need or add in the local.conf file in Yocto.

 

Also, it appears there is a recipe here:

under: recipes-python/ultralytics/python3-ultralytics_8.1.45.bb

 

You can try it.

 

Best regards,

Salas.

0 Kudos
Reply