Bird or not? | Solver for XKCD 1425
In a few lines of Python code (with Keras), leveraging a ResNet-50 trained on ImageNet. No further finetuning was used.
Clone the repository. Make sure you have Pipenv installed, and run:
pipenv sync
Invoke with the command line argument with a directory containing (only) images:
python birds.py <DIR_WITH_IMAGES>
To run with the example images:
python birds.py ./images
The images in the images
folder are free and obtained from pixabay.
- https://pixabay.com/en/raindrop-dewdrop-strawberry-flower-3402550/
- https://pixabay.com/en/panorama-sky-city-architecture-3094696/
- https://pixabay.com/en/owl-snow-snow-owl-bird-forest-3184032/
- https://pixabay.com/en/bird-wild-world-animal-nature-3113835/
- https://pixabay.com/en/trees-forest-forest-path-sunlight-3410836/
- https://pixabay.com/en/raindrop-dewdrop-strawberry-flower-3402550/
Released under the BSD 3-Clause.