Downloads · 30 days
0
muellerzr/fastai-pets-resnet-34
fastai-pets-resnet-34 is a machine learning model from muellerzr. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is based on Lesson 1 of fastai and of Walk with fastai
Downloads · 30 days
0
Access
Public
Updated Jan 20, 2022
Repo size
263 MB
Likes
1
Public
Click a slice to open those files.
.pkl87.6 MB · 100%
From the Hugging Face model README
This model is based on Lesson 1 of fastai and of Walk with fastai
This model was created with the Oxford Pets dataset in the fastai framework
The model was trained as a binary classifier, for cats or dogs
First, ensure that huggingface_hub is installed:
pip(3) install huggingface_hub
Next, download this model repo:
from huggingface_hub import snapshot_download
snapshot_download(repo_id="muellerzr/fastai-pets-resnet-34")
Then install the correct fastai version:
cd fastai-pets-resnet34
pip(3) install -r requirements.txt
NOTE: This is extremely important, as fastai versions are aggressively pinned based on training environment
And finally load in the fastai Learner and predict
from fastai.learner import load_learner
learn = load_learner('model.pth')
pred = learn.predict('myImage.jpg')
Versions of model used were taken with dependency_checker