Skip to content

wprobst1/4273Project2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

4273 Project 2 Group 1 - Object Recognition Using YOLO11\
Group members - Wyatt Probst, Cade Seay, Garrett Fundis, Kyle Bowser

------------------------Dependencies----------------------------------------------
The YOLO model is dependent on the following packages:
gitpython>=3.1.30
matplotlib>=3.3
numpy>=1.23.5
opencv-python>=4.1.1
pillow>=10.3.0
psutil
PyYAML>=5.3.1
requests>=2.32.2
scipy>=1.4.1
thop>=0.1.1
torch>=1.8.0
torchvision>=0.9.0
tqdm>=4.66.3
ultralytics>=8.2.34

------------------------Installation----------------------------------------------
The following commands comprise the installation procedure of the model
git clone https://github.com/wprobst1/4273Project2
cd 4273Project2
pip install requirements.txt
python predict.py --source /path/to/video

---------------------------Usage--------------------------------------------------
To use the model for object detection, use the command:
python predict.py --source 0 #for use with web camera
python predict.py --source "path to .mp4 source" #for use with video input
Add --conf_thres float to adjust the sensitivity of the model when drawing boxes
Add --iou_thres float to adjust intersection sensitivity of objects in the frame
Add --view_img to see the output in real time from a .mp4

---------------------------Obstacles-----------------------------------------------
Our major obstacles were:

The datasets from roboflow were often filled with poor quality images with obfuscated or objectively strange sunbjects in the photos.
This made the model training difficult as we had to chage our datasets multiple times looking for ones that had a good variety of subjects with decent images.
The sets we generated in roboflow had many more issues, one of which was that it divided our pikachu class into two classes, reducing our accuracy.

We started training the model in google colab, and the weights generated by our training were not usable in the windows CLI. We ended up writing python scripts to use the weights,
and this solved that issue. Furthermore with colab, it has a strict time limit of around 12 hours before we are kicked off and after that just two hours a day when it would let us back on.
This made training pretty difficult after our initial period of figuring the model out as we had very limited GPU time on colab.

With our CI/CD implementation, we had great difficulty withn our initial choice of Jenkins so me moved on to TravisCI. With TravisCI, we were able to run simpole tests of a few commands successfully,
but when it came to automatically testing the model with ultralytics commands, we got many errors about imports failing and packages missing which we couldn't fix. The commands we were trying to run on 
TravisCI work completely within the windows CLI, but for unknown reasons won't work through scripting.

--------------------------Deliverables------------------------------------------
The deliverables for this project can be found in the Project2Output folder within the repository.
This includes our cost function graph, accuracy table, output video sample, pydoc documentation, and some other relevant graphs.
The predict.py script functions in the windows CLI using our pretrained weights, and the model has an 85% accuracy on all classes.
The model is also able to detect multiple objects in the same image and the live webcam functionality works as well.

--------------------------Credits-------------------------------------------------
The base model was sourced from Ultralytics at https://github.com/ultralytics/yolov5
The training and validation data was sourced from Roboflow at
@misc{
                            pikachu-nmdik_dataset,
                            title = { Pikachu Dataset },
                            type = { Open Source Dataset },
                            author = { Pikachu },
                            howpublished = { \url{ https://universe.roboflow.com/pikachu-9uv9m/pikachu-nmdik } },
                            url = { https://universe.roboflow.com/pikachu-9uv9m/pikachu-nmdik },
                            journal = { Roboflow Universe },
                            publisher = { Roboflow },
                            year = { 2024 },
                            month = { jul },
                            note = { visited on 2024-12-03 },
                            }
@misc{
                            drones4_dataset,
                            title = { Drones4 Dataset },
                            type = { Open Source Dataset },
                            author = { Ivonne },
                            howpublished = { \url{ https://universe.roboflow.com/ivonne/drones4 } },
                            url = { https://universe.roboflow.com/ivonne/drones4 },
                            journal = { Roboflow Universe },
                            publisher = { Roboflow },
                            year = { 2023 },
                            month = { feb },
                            note = { visited on 2024-12-03 },
                            }
@misc{
                            dog-uxste_dataset,
                            title = { DOG Dataset },
                            type = { Open Source Dataset },
                            author = { Max },
                            howpublished = { \url{ https://universe.roboflow.com/max-evo5q/dog-uxste } },
                            url = { https://universe.roboflow.com/max-evo5q/dog-uxste },
                            journal = { Roboflow Universe },
                            publisher = { Roboflow },
                            year = { 2024 },
                            month = { may },
                            note = { visited on 2024-12-03 },
                            }
@misc{
                            catdetection-gy4yk_dataset,
                            title = { catdetection Dataset },
                            type = { Open Source Dataset },
                            author = { qb d },
                            howpublished = { \url{ https://universe.roboflow.com/qb-d/catdetection-gy4yk } },
                            url = { https://universe.roboflow.com/qb-d/catdetection-gy4yk },
                            journal = { Roboflow Universe },
                            publisher = { Roboflow },
                            year = { 2024 },
                            month = { may },
                            note = { visited on 2024-12-03 },
                            }
@misc{
                            people-counting-oh6y8_dataset,
                            title = { People Counting Dataset },
                            type = { Open Source Dataset },
                            author = { CONTADOR },
                            howpublished = { \url{ https://universe.roboflow.com/contador/people-counting-oh6y8 } },
                            url = { https://universe.roboflow.com/contador/people-counting-oh6y8 },
                            journal = { Roboflow Universe },
                            publisher = { Roboflow },
                            year = { 2024 },
                            month = { apr },
                            note = { visited on 2024-12-03 },
                            }

About

Software engineering object recognition project

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors