- Download dataset from here
- Then
mkdir cards-image-datasetclassification
mv cards-image-datasetclassification.zip cards-image-datasetclassification
cd cards-image-datasetclassification
unzip -q cards-image-datasetclassification.zip
conda create -n myenv python=3.9
conda activate myenv
pip install -r requirements.txt
Training script:
python main.py --train-folder ${train_folder} --test-folder ${valid_folder} --batch-size ${bs} --learning-rate ${lr} --epochs ${epochs}
Example:
python main.py -bs 16 --epochs 1
After training, we have the model saved in model
folder. We can run FastAPI to serve the model.
cd app
python main.py
Then open browser and go to localhost:8088/docs
to see the API documentation.
docker compose -f grafana/docker-compose.yml up -d
Then open browser and go to localhost:3000
to see the Grafana dashboard.
pre-commit install
pre-commit run --all-files