Reproduce the Experiment for the Image-Based Parking Space Occupancy Classification: Dataset and Baseline Paper Using MLFlow. Please refers to martin-marek/parking-space-occupancy for the original implementation.
Accompanying paper: Image-Based Parking Space Occupancy Classification: Dataset and Baseline
In this repository, I provide:
- Code to reproduce all of my result.
- Download link for training logs with MLFlow.
- Colab notebooks to explore training experiments with MLFlow, explore my experiment result using MLFlow UI.
Two methods are provided by this paper i.e. RCNN and Faster RCNN with FPN. All of these method are customed based on ACPDS dataset. This repository aims to reproduce the experiments in this paper, then track the result using MLFlow Tracking.
RCNN | FasterRCNN with FPN | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Each of these experiment are trained using some configuration such as:
Epoch
: 10Train batch size
: 1Val and Test batch size
: 1Optimizer
: AdamWLearning rate
: 1e-4- etc.
Note: Because of my limited resources, I couldn't try the epochs the same as the one in the paper.
Clone this repository
git clone https://github.com/danielsyahputra/parking-space-detection.git
cd parking-space-detection
Download data that is used for training
python3 download.py --download-data True
If you want to run all experiment at once.
python3 train_all.py \
--batch-size <BATCH_SIZE> \
--test-batch-size <YOUR_TEXT_BATCH_SIZE> \
--epochs <YOUR_EPOCH> \
--lr <YOUR_LEARNING_RATE>
--experiment-name <YOUR_EXPERIMENT_NAME>
Docs:
--batch-size: Batch size for training data (default: 1).
--test-batch-size: Batch size for testing and validation data (default: 1).
--epochs: Number of epochs for experiment (default: 10).
--lr: Learning rate used for experiment (default 1e-4).
--experiment-name: The name of experiment that will be passed to MLFlow Tracking.
If you just want to know the result of one of the experiment:
python3 train.py \
--batch-size <train_batch_size> \
--test-batch-size <test_batch_size> \
--epochs <your_epoch> \
--model-name <model_baseline> \
--pooling-type <pooling_type> \
--roi-res <roir_res>
Docs
--batch-size: Batch size for training data (default: 1).
--test-batch-size: Batch size for testing and validation data (default: 1).
--epochs: Number of epochs for experiment (default: 10).
--lr: Learning rate used for experiment (default 1e-4).
--model-name: The baseline model used for experiment (default: RCNN).
List of possibles value: [RCNN, FasterRCNN_FPN]
--pooling-type: Pooling type used for experiment (default: qdrl)
List of possibles value: [qdrl, square]
--roi-res: This arguments based on --model-name before.
Possibles value for RCNN baseline: [64, 128, 256]
Possibles value for FasterRCNN_FPN baseline: [800, 1100, 1440]
Example:
python3 train.py \
--epochs 10 \
--model-name RCNN \
--pooling-type square \
--roi-res 128
RCNN | FasterRCNN with FPN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
All these experimental results have been tracked using MLFlow and can be accessed with the following step.
There are two ways for accessing my tracking result.
- Local
git clone https://github.com/danielsyahputra/parking-space-detection.git
cd parking-space-detection
python3 download.py --download-mlruns True
mlflow ui
Then, open your http://127.0.0.1:5000
To access MLFlow UI that is run in Colab, we need a third-party to forward the localhost in the collab machine so it can be accesed outside the machine. In this solution, I use Ngrok, a programmable network edge that adds connectivity, security, and observability to your apps with no code changes. For more information, you can check the collab link that I have given before.
@misc{marek2021imagebased,
title={Image-Based Parking Space Occupancy Classification: Dataset and Baseline},
author={Martin Marek},
year={2021},
eprint={2107.12207},
archivePrefix={arXiv},
primaryClass={cs.CV}
}