Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonw/cougar-or-not
An API for identifying cougars v.s. bobcats v.s. other USA cat species
https://github.com/simonw/cougar-or-not
computer-vision fastai inaturalist starlette zeit-now
Last synced: 8 days ago
JSON representation
An API for identifying cougars v.s. bobcats v.s. other USA cat species
- Host: GitHub
- URL: https://github.com/simonw/cougar-or-not
- Owner: simonw
- Created: 2018-10-28T05:51:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T23:10:58.000Z (about 6 years ago)
- Last Synced: 2024-10-18T07:54:51.282Z (22 days ago)
- Topics: computer-vision, fastai, inaturalist, starlette, zeit-now
- Language: Jupyter Notebook
- Homepage: https://cougar-or-not.now.sh/
- Size: 76.4 MB
- Stars: 122
- Watchers: 7
- Forks: 56
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cougar-or-not
My first attempt at a machine learning API, using a pre-calculated model trained using [iNaturalist](https://www.inaturalist.org/) data.
The resulting API is used by the [@critter_vision](https://twitter.com/critter_vision) Twitter bot, the source code for which can be found at https://github.com/natbat/CritterVision
The model is `usa-inaturalist-cats.pth` - an 83MB file.
The notebook `inaturalist-cats.ipynb` shows how I trained the model, using [fastai](https://github.com/fastai/fastai).
`cougar.py` is a very tiny [Starlette](https://www.starlette.io/) API server which simply accepts file image uploads and runs them against the pre-calculated model.
It also accepts a URL to an image, e.g. https://cougar-or-not.now.sh/classify-url?url=https://upload.wikimedia.org/wikipedia/commons/9/9a/Oregon_Cougar_ODFW.JPG
The `Dockerfile` means the entire thing can be deployed to [Zeit Now](https://zeit.co/now) or any other container hosting service.
## Examples
Cougar: https://cougar-or-not.now.sh/classify-url?url=https://upload.wikimedia.org/wikipedia/commons/9/9a/Oregon_Cougar_ODFW.JPG
Bobcat: https://cougar-or-not.now.sh/classify-url?url=https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Bobcat2.jpg/1200px-Bobcat2.jpg