This repository contains few files to explain and get an idea about how I performed the project.
-
test images and videos/
- This directory contains sample images and videos for testing the trained model. You can place your own test files here to see the model's performance on different inputs.
-
TSD.ipynb
- This Jupyter notebook file contains code for running and testing the YOLOv7 model on images. It includes steps for loading the model, preprocessing images, and displaying the results with detected traffic signs.
-
environment.yml
- This file contains the environment configuration for Conda. It lists all the dependencies and their versions required to run the project. You can create the environment using the command:
conda env create -f environment.yml
- This file contains the environment configuration for Conda. It lists all the dependencies and their versions required to run the project. You can create the environment using the command:
-
requirements.txt
- This file lists all the Python packages required to run the project. You can install the dependencies using pip:
pip install -r requirements.txt
- This file lists all the Python packages required to run the project. You can install the dependencies using pip:
-
test.py
- This script contains code for running the YOLOv7 model on images or videos. It includes functions for loading the model, processing the inputs, and displaying the detections.
-
train.py
- This script is used for training the YOLOv7 model on a custom dataset. It includes configuration settings and parameters for training the model.
-
Set Up the Environment:
- Create a Conda environment using
environment.yml
:conda env create -f environment.yml
- Or install the dependencies using
requirements.txt
:pip install -r requirements.txt
- Create a Conda environment using
-
Training the Model:
- To train the model on your custom dataset, update the
train.py
script with the path to your dataset and run:python train.py
- To train the model on your custom dataset, update the
-
Testing the Model:
- Use the
test.py
script to run the model on images or videos. Ensure your test files are placed in thetest images and videos/
directory.python test.py
- Use the
-
Using the Jupyter Notebook:
- Open
TSD.ipynb
in Jupyter Notebook or JupyterLab to interactively test the model on images and visualize the results.
- Open
- Ensure you have the necessary hardware (GPU) and CUDA installed for optimal performance.
- Update the paths in the scripts as per your directory structure and requirements.
- For detailed usage and customization, refer to the comments and documentation within each script.