This project is based on the algorithm proposed in the paper Yolov3: An Incremental Improvement Yolov3.
The code can be run locally to perform Object detection on custom dataset by performing the following steps:
- Open terminal, and execute
git clone https://github.com/arshagarwal/Yolo_object_detection.git
or alternatively you can clone the repo by clicking the "code"button on the repositiory's main page. - Run the command
wget -P weights https://pjreddie.com/media/files/yolov3.weights
to download the official weights. - After cloning the directory navigate to the directory where the code is saved using the
cd
command. - Perform detection using
python detect.py data_path
where data_path is a string that gives the path to the directory which contains the images on which object detection is to be performed. For ex if you want to run the code on Sample_dataset provided in the repo, use the codepython detect.py Sample_dataset
.
Note: This might have thrown AttributeError: module 'tensorflow' has no attribute 'placeholder'
this is because this code makes use of methods which are deprecated in tensorflow version 2.2.0.To fix this run !pip uninstall tensorflow
,then run !pip install tensorflow=={1.14}
.
- The results obtained after performing Object Detection gets stored in results directory which in turn is in the same directory where your code was cloned.
!pip uninstall tensorflow
, Then run!pip install tensorflow=={1.14}
, to use tensorflow1.14 instead of tensorflow2.2.- Clone the repsoitory using
!git clone https://github.com/arshagarwal/Yolo_object_detection.git
. - Run
cd /content/Yolo_object_detection
to navigate to the project's working directory. - Run the command
!wget -P weights https://pjreddie.com/media/files/yolov3.weights
to download the official weights. - Run the command
!python detect.py data_path
where data_path is a string that gives the path to the directory which contains the images on which object detection is to be performed. For ex if you want to run the code on Sample_dataset provided in the repo, use the code!python detect.py Sample_dataset
. - The results obtained after performing Object Detection gets stored in results directory which in turn is in the same directory where your code was cloned.
- Create a zip file by running the code
Code to be added soon
- Download file by running
Code to be added soon
bash run.sh data_path
where data_path is a string that denotes the path where the dataset on which Object detection is to be performed is stored.
!bash run.sh data_path
where data_path is a string that denotes the path where the dataset on which Object detection is to be performed is stored.