https://github.com/PRU-Robotics/jetson-rpi-image-processing
Base Image Processing repo focuses on YOLO (You Only Look Once) used in Jetson Nano (+ Orin Nano) & Raspberry Pi 4
https://github.com/PRU-Robotics/jetson-rpi-image-processing
embedded-linux google-colab image-processing image-processing-python jetson-devices jetson-nano jetson-orin-nano mit-licence mit-license object-detection open-source raspberry-pi-4 ultralytics yolo yolo-object-detection yolov3 yolov4-tiny yolov5 yolov7 yolov8
Last synced: 3 months ago
JSON representation
Base Image Processing repo focuses on YOLO (You Only Look Once) used in Jetson Nano (+ Orin Nano) & Raspberry Pi 4
- Host: GitHub
- URL: https://github.com/PRU-Robotics/jetson-rpi-image-processing
- Owner: PRU-Robotics
- License: mit
- Created: 2024-04-02T08:50:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-12T11:03:14.000Z (8 months ago)
- Last Synced: 2025-01-30T19:27:06.642Z (4 months ago)
- Topics: embedded-linux, google-colab, image-processing, image-processing-python, jetson-devices, jetson-nano, jetson-orin-nano, mit-licence, mit-license, object-detection, open-source, raspberry-pi-4, ultralytics, yolo, yolo-object-detection, yolov3, yolov4-tiny, yolov5, yolov7, yolov8
- Language: Python
- Homepage:
- Size: 90.3 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
![]()
Image Processing | Object Detection
* [Purpose](#purpose)
* [Features](#features)
* [Prerequisites](#prerequisites)
* [Notes](#notes)
* [Project Structure](#project-structure)
* [Raspberry Pi](#raspberry-pi)
* [How To Run?](#how-to-run)
* [Jetson Nano](#jetson-nano)
* [Jetson Orin Nano](#jetson-orin-nano)
* [Licence](#licence)## Purpose
Base Image Processing and custom Object Detection repo focuses on YOLO (You Only Look Once) used in Jetson Nano (+ Orin Nano) & Raspberry Pi 4.
It also contains various real time image processing applications and related with electrical components such as Pixhawk and Servo motors.
Main purpose of this repo is creating an image processing software base in mainboards for practicing and adapting the current experiences for the next generation of our technical project members.
## Features
### Prerequisites
* Raspberry Pi 4 - 4GB (at least)
* Jetson Nano 4GB
* Jetson Orin Nano
* USB Camera
* SD Card (32GB at least) and reader### Notes
1. Install an OS for Raspberry and Jetson then use: `!Warning: Need to install the 64-bit OS for Raspberry Pi due to YOLO's ultralytics library configurations in python.`
2. Using USB Camera for higher FPS and better software quality rather than CSI cameras. Further, 64-bit OS is not suitable with CSI cameras in general.3. For USB cameras opencv index is: `In Raspberry Pi 4, videoCapture(1)` and `Jetson Nano devices, videoCapture(0)`.
4. WIP: `tensorflow` library is unavailable to install and use in Raspberry Pi 64-bit OS, currently. [Click to see the issue!](https://github.com/PRU-Robotic/jetson-rpi-image-processing/issues/1)
## Project Structure
The project follows this directory structure:
```
jetson-rpi-image-processing/
│
├── cfg/
│ ├── yolov3_testing.cfg
│ └── yolov4-tiny-custom.cfg
│
├── components/
│ ├── gpio_guide.py
│ ├── mav_pixhawk.py
│ ├── mavlink_object-detect.py
│ ├── mesafe_sensor.py
│ └── servo.py
│
├── object_detection/
│ ├── coco.names
│ ├── object_detection.py
│ ├── realtime_core.py
│ ├── realtime_gpio.py
│ ├── realtime_ultralytics.py
│ └── realtime_v1.py
│
├── test_images/
│ └── ...
│
├── training/
│ └── train_YoloV3.ipynb
│
├── weights/
│ ├── best.pt
│ ├── yolov8n.pt
│ ├── yolov3_training_last.weights
│ └── yolov4-tiny-custom_last.weights
│
├── gitignore
├── README.md
└── requirements.txt
```- cfg/: Contains config files for yolov3 and yolov4-tiny.
- components/: Contains code samples related with electrical components such as Pixhawk and Servo motors.
- object_detection/: Contains image processing and object detection codes in both real time and normal.
- test_images/: PNG or JPG image files for testing.
- training/: Google Colab yolov3 training notebook.
- weights/: Custom trained weight files for yolov3, yolov4-tiny and yolov8
- requirements.txt: Lists project dependencies.## Raspberry Pi
### How To Run?
1. Virtual environment setup:
```
python3 -m venv yolovenv
```2. To activate the virtual environment (Windows):
```
yolovenv/Scripts/activate
```3. To activate the virtual environment (Linux / MacOS):
```
source yolovenv/bin/activate
```4. Install dependencies:
- If you are running repository on hardware platforms other than Raspberry Pi or Jetson, you should remove `RPi.GPIO` library from `requirements.txt` file; because this library is designed specifically for devices equipped with GPIO pins and may not be compatible with other platforms.
- The `ultralytics` library may not be compatible with all Python environments depending on your device but it's essential for certain features, particularly on Raspberry Pi with 64-bit OS.```
pip install -r requirements.txt
```
or
```
pip3 install -r requirements.txt
```5. Run:
```
python file_name.py
```
or
```
python3 file_name.py
```## Jetson Nano
### Jetson Orin Nano
For Jetson Nano (4GB) and Jetson Orin Nano (8GB), there is no need to use python environment for running `ultralytics` library as an extra. It can be installed and used, directly:
```
pip install ultralytics
```
or
```
pip3 install ultralytics
```## Licence
This project is licensed under the MIT License - see the [LICENSE](https://github.com/PRU-Robotic/jetson-rpi-image-processing?tab=MIT-1-ov-file#readme) file for details.