This repo contains the code for RANZCR CLiP Competition on Kaggle.
You can play with already trained models here.
Clone the repo and install requirements
git clone https://github.com/asnorkin/ranzcr_clip.git
python -m pip install -r requirements.txt
Install DVC, load the dataset and pretrained models
python -m pip install dvc dvc[gdrive]
dvc pull
Or just models
dvc pull ranzcr_clip/models
Run training
cd ranzcr_clip
./train_segmentation.sh
Check training output log
tail -F -n 10000 segmentation/train_outputs/<experiment>.log
Visualize training logs on tensorboard
tensorboard --logdir=segmentation/logs
Copy trained model into the service
cp segmentation/checkpoints/<experiment>/<model_name>.ckpt models/<model>/<model_name>.ckpt
Run the demo with new model locally
PYTHONPATH=ranzcr_clip:${PYTHONPATH} streamlit run app/app.py
docker-compose up --build -d