dohoseok / context-based-parking-slot-detect

98 stars 27 forks source link

context-based-parking-slot-detect

Tensorflow implementation of Context-based parking slot detection (IEEE Access)

This implementation is based on https://github.com/wizyoung/YOLOv3_TensorFlow

Prepare Dataset (PIL-park)

  1. This code should be run only once at the beginning.

  2. Download Train Dataset

    • link
    • Unzip to $your_data_path/train folder
  3. Download Test Dataset

    • link
    • Unzip to $your_data_path/test folder
  4. Data augmentation, create tfrecord and text files

    • python prepare_data.py --data_path=$your_data_path

Train Dataset

  1. Download pretrain weight (Updated 2020.10.26)

    • link
    • Save to 'pre_weight' folder under "context-based detect" folder
  2. python train.py --data_path=$your_data_path

  3. Trained Weight path

    • Weight files of parking context recognizer are saved to 'weight_pcr/YYYYMMDD_HHMM'
    • Weight files of parking slot detector fine-tuned for parallel parking slots are saved to 'weight_psd/type_0/YYYYMMDD_HHMM'
    • Weight files of parking slot detector fine-tuned for perpendicular parking slots are saved to 'weight_psd/type_1/YYYYMMDD_HHMM'
    • Weight files of parking slot detector fine-tuned for diagonal parking slots are saved to 'weight_psd/type_2/YYYYMMDD_HHMM'

Test Method (with downloaded weight files)

  1. Download trained weight

    • link
    • Unzip under main path (locate "weight_pcr" and "weight_psd" under "context-based detect" folder)
  2. Evaluate

    • python test.py --data_path=$your_test_path

Test Method (with your trained weight files)

  1. Evaluate
    • python test.py --data_path=$your_test_path --pcr_test_weight='weight_pcr/YYYYMMDD_HHMM/cp-0050.ckpt' --psd_test_weight_type0='weight_psd/type_0/YYYYMMDD_HHMM' --psd_test_weight_type1='weight_psd/type_1/YYYYMMDD_HHMM' --psd_test_weight_type2='weight_psd/type_2/YYYYMMDD_HHMM'

Converted dataset of ps2.0