Skip to content

Commit

Permalink
README file
Browse files Browse the repository at this point in the history
  • Loading branch information
nicorossini committed Jan 25, 2024
1 parent 360c312 commit c505eb9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
24 changes: 24 additions & 0 deletions ImageRecognition/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Technology
<p align="center">
<a href="https://www.ultralytics.com" target="blank"><img src="https://assets-global.website-files.com/646dd1f1a3703e451ba81ecc/64777c3e071ec953437e6950_logo.svg" alt="Ultralytics Yolo" /></a>
</p>

Ultralytics YOLO for building accurate and efficient object detection models.

## Running the app
First, open the terminal and move to the ImageRecognition directiory.
Run send_frame.py for sending camera frames:

```bash
python send_frame.py
```

To start the object detection function move to the src directory and run ObjectDetectionYOLO.py:

```bash
python ObjectDetectionYOLO.py
```

## Learn More
To learn more about YOLO architecture, take a look at the following resource:
- [YOLO Documentation](https://docs.ultralytics.com).
3 changes: 2 additions & 1 deletion ImageRecognition/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
opencv-python~=4.8.1.78
numpy~=1.26.1
ping3~=4.0.4
ffmpeg-python~=0.2.0
python>=3.8
PyTorch>=1.8
3 changes: 1 addition & 2 deletions ImageRecognition/send_frame.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import cv2
import socketio
import base64
import threading

#cameras data
Expand Down Expand Up @@ -40,7 +39,7 @@ def send_frames(camera_id, capture, interval=0.1):
for camera_id, camera_url in cameras.items():
capture = cv2.VideoCapture(camera_url)
if not capture.isOpened():
print(f"Errore nell'apertura della telecamera {camera_id}")
print(f"Error stream with camera {camera_id}")
continue

threading.Thread(target=send_frames, args=(camera_id, capture)).start()
Expand Down

0 comments on commit c505eb9

Please sign in to comment.