Download the in-distribution data (cat vs dog):
mkdir -p data
curl -X GET https://s3.amazonaws.com/fast-ai-imageclas/oxford-iiit-pet.tgz --output data/pets.tgz
tar -xzf data/pets.tgz -C data
Then train a model:
poetry run python ch03/ood/train.py
Download the OOD data:
curl -X GET https://s3.amazonaws.com/fast-ai-imageclas/imagenette-160.tgz \
--output data/imagenette.tgz
tar -xzf data/imagenette.tgz -C data
Then, use the model path to test the model on out-of-distribution images
poetry run python ch03/ood/ood.py --model-path model.keras