It entirely depends on what sort of images you want yours model to work on.
If you want to detect the shape of a plane, then you may want to remove interior images. If you only want to detect real life planes, then you may want to remove pictures of planes, such as on the shirt.
General strategy to work out where an issue comes from…
Duplicate the code which generates and saves your pickle file,
then append the “load_learner()” line. Presumably the “load_learner()” line works successfully.
Starting just above the “load_learner()” and working up, progressively delete small parts of the code and run it, until you recreate the “load_learner()” issue. Once you are able to iterate around a point breaking/fixing the code, you have your best chance to understand the issue.
I used my model from lesson 1, which classifies chess pieces and created a deployment on Hugging-Faces: Chess Classifier - a Hugging Face Space by mw00 (unfortunately for some reason the example images don’t work, but uploading your own works fine)
I also updated the notebook with a confusion matrix and as it turns out, the model has problems distinguishing Kings and Queens! Is it a King? | Kaggle
In order to deploy my bear classifier as a real application in Binder, I have encountered some compatibility issues between the different dependencies. I’m posting this in case I can save some hours of work for a beginner like me.
First I prepared a notebook based on GitHub - fastai/bear_voila: Demo bear classifier with fastai and Voila. The notebook ran correctly in Colab and Gradio, but when I ran the notebook on my computer, both in voila and Jupyter (notebook and lab), I always got the same error:
Failed to load model class ‘VBoxModel’ from module ‘@jupyter-widgets/controls’
When I installed fastbook on my computer, it also installed ipywidgets 7.7.2. I tried different versions of ipywidgets (7.5.1, 7.6.5 ), but the error persisted. In the end I decided to install the latest version of ipywidgets 8.0.4 (although it is not fastbook compatible). Now the error was different:
Mi equipo es Linux Mint 21.1 y algunas de las dependencias que tengo instaladas son:
On another note, in all the notebooks of lessons 1 and 2 there is a warning that I have not been able to solve:
Entirely stuck once the command line and VScode got pulled into the mix. The lesson could be cleaned up a bit so it doesn’t jump around so much. Probably shouldn’t expect folks to learn all of that whilst also learning this or at least have direct resources so we could get going and straight to what is needed. Should have a straight forward version of building and downloading the files to upload to hugging face and then another version of how to do it in full through the terminal + VScode.
I know I’m missing out on this and it’ll probably take me a few weeks to just get through this lesson because I’m so unfamiliar with these other tools.
I already saw the class but as I understand it, it would only serve me to classify that specific breed. Is there a way to add new breeds to the PETS dataset or train the PETS-trained model with more breeds?
You Should checkout The contents of The breeds dataset and add your breed with Images in the same style as the others. Which probably is a folder with images of the breed. Where the folder has the breed name. you could do this in the same way as you’ve done in the first two lessons, but now you add the categories to the breeds dataset
as @gmjn said, when you download your PETS dataset, create a new folder in it for your specific breed and fill it with images of the said breed, then modify your code to handle that additional breed and you are good to go!