Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.04 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.04 KB

README

Keras-based YOLO v3, baseline solution for rebar-detection on Data-Foundation. It can also be used for VOC dataset.

Step 1. Install required packages.

pip install -r requirements.txt

Step 2. Generate VOC dataset. It would not be necessary if you already have one.

cd toXML
python generate_txt.py
python main.py
cd ..

Step 3. Gererate augmented dataset with h5py file format. This step contributes to speeding up the training procedure.

python generate_h5_data_file.py

Step 4. Download YOLO v3 weights file from YOLO website, and convert it to h5 file format.

mkdir pretrined_weights
python convert2keras_weights.py yolov3.cfg yolov3.weights pretrined_weights/yolo.h5

Step 5. Train the model, and fine-tune if needed.

mkdir model_data_stage_1 model_data_stage_2
python stage_1.py
python stage_2.py

Step 6. Generate the predicted result.

python predict.py
python output.py