Skip to content

Commit 88b1ff5

Browse files
authored
Add files via upload
Signed-off-by: Bubbles The Dev <[email protected]>
1 parent d662463 commit 88b1ff5

File tree

8 files changed

+761
-0
lines changed

8 files changed

+761
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Exporting For AMD GPU Users
2+
3+
4+
## 💻 For `AMD GPU` Users
5+
6+
If you have an **AMD GPU**, follow the steps below to set up DirectML support for faster processing:
7+
8+
1. **Install AMD GPU dependencies**:
9+
- Run the **`amd_gpu_requirements.bat`** script to install the necessary dependencies for AMD GPU:
10+
```
11+
amd_gpu_requirements.bat
12+
```
13+
14+
This will install **DirectML** and other required packages, enabling the project to run efficiently on AMD hardware.
15+
16+
17+
2. `CD` the `export.pt` in `CMD.exe`
18+
3. If you want to `CD` the `export.py` in the `models` folder you can so you can keep track of your [models](https://github.com/FNBUBBLES420-ORG/game-vision-aid/tree/main/models)
19+
4. `models` folder is in the `root in the main directory of the repo`
20+
- type the following command:
21+
```
22+
python .\export.py --weights ./"your_model_path.pt" --include onnx --half --imgsz 320 320 --device 0
23+
```
24+
25+
26+
### Troubleshooting
27+
28+
If you encounter any issues, such as an **Ultralytics error**, follow the steps below:
29+
30+
1. Run the following command in `CMD.exe` to upgrade Ultralytics:
31+
```
32+
pip install --upgrade ultralytics
33+
```
34+
35+
2. The `Ultralytics` package is already included in the `requirements.txt` and `requirements.bat` files.
36+
37+
3. Use the `update_ultralytics.bat` script if you continue to experience Ultralytics errors.
38+
39+
### Note
40+
- If you get an Ultralytics error when installing
41+
Run the Command below in `CMD.exe`
42+
```
43+
pip install --upgrade ultralytics
44+
```
45+
- I did include the `Ultralytics` in the requirements.txt` and `requirements.bat`.
46+
- Use the `install_pytorch.bat` as it is tied to `cu118`. (Recommended)
47+
- Use the `update_ultralytics.bat` if you have `ultralytics error`
48+
49+
50+
51+
## If you have an AMD GPU and want to use ROCm:
52+
```
53+
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.0
54+
```

AMD-GPU-Only/amdgpu-launcher.bat

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
REM Save the current directory
3+
pushd %~dp0
4+
5+
REM Run the Python script and check for errors
6+
echo Running main.py...
7+
python main.py
8+
if %errorlevel% neq 0 (
9+
echo Error: main.py did not run successfully.
10+
popd
11+
exit /b %errorlevel%
12+
)
13+
14+
REM Provide success feedback
15+
echo main.py ran successfully.
16+
17+
REM Return to the original directory
18+
popd

AMD-GPU-Only/config-launcher.bat

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@echo off
2+
REM Save the current directory
3+
pushd %~dp0
4+
5+
REM Check if config.py exists
6+
if not exist config.py (
7+
echo Error: config.py not found.
8+
popd
9+
exit /b 1
10+
)
11+
12+
REM Open the config.py file with the default text editor
13+
echo Opening config.py...
14+
start config.py
15+
16+
REM Provide success feedback
17+
echo config.py opened successfully.
18+
19+
REM Return to the original directory
20+
popd

AMD-GPU-Only/config.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Configuration for BetterCam Screen Capture and YOLO model
2+
3+
# Screen Capture Settings
4+
screenWidth = 480 # Updated screen width for better resolution
5+
screenHeight = 480 # Updated screen height for better resolution
6+
7+
# Object Detection Settings
8+
confidenceThreshold = 0.5 # Confidence threshold for object detection
9+
nmsThreshold = 0.4 # Non-max suppression threshold to filter overlapping boxes
10+
11+
# YOLO Model Settings
12+
modelType = 'torch' # Choose 'torch' or 'onnx' based on the model you want to load
13+
torchModelPath = 'models/fn_v5.pt' # Path to YOLOv5 PyTorch model
14+
onnxModelPath = 'models/model_fn_v5v5320320Half.onnx' # Path to YOLOv5 ONNX model
15+
16+
# BetterCam Settings
17+
targetFPS = 60 # Frames per second for capturing
18+
maxBufferLen = 512 # Max buffer length for storing frames
19+
region = None # Region for capture (set to None for full screen)
20+
useNvidiaGPU = False # Set to False If you do not have NVidia GPU
21+
22+
# Colors for Bounding Boxes
23+
boundingBoxColor = (0, 255, 0) # Default bounding box color in BGR format
24+
highlightColor = (0, 0, 255) # Color for highlighted objects

0 commit comments

Comments
 (0)