Skip to content

Runs yolov10 with Python and connects to the DLang with the socket module and passes the data to the D program

Notifications You must be signed in to change notification settings

iXenonN/DLang-Yolov10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Yolov10 With DLang

Runs yolov10 with Python and connects to the DLang with the socket module and passes the data to the D program.

📚 Libraries Used

Python:

from ultralytics import YOLOv10
import supervision as sv
import cv2
import socket
import pickle

For Install:

pip install supervision
pip install ultralytics
pip install opencv-python

DLang:

import std.stdio;
import std.socket;
import std.array;

🛠️ Installation Steps:

1. Download any yolov10 pt from the link below and put it in the same folder as your project folder.

https://github.com/THU-MIG/yolov10

3. Then copy the name of the pt you downloaded and paste it to 'YOUR YOLOV10 PT' part of python code.

MODEL_PATH = 'YOUR YOLOV10 PT'

3. Make sure you have any D compiler like dmd.

4. Open your D command prompt and cd to your project path.

5. Run the python code first then run the D code with "dub run" command in your D command prompt.

dub run

6. If everything goes right you should have seen the output.

🚧 Troubleshooting & Common Issues

❌ Issue: `core.exception.OutOfMemoryError@src\core\internal\gc\impl\conservative\gc.d(512): Memory allocation failed`

- Cause:

This error occurs when you try to make a memory allocation in the D language and there is not enough memory available..

- Solution:

Ensure that your camera is turned on and yolov10 is running.

About

Runs yolov10 with Python and connects to the DLang with the socket module and passes the data to the D program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published