So, Let’s start :)
At first, we need a dataset with the next classes:
- Person
- Animals
- Other
Let me describe what each class I mean:
- In a first-class “person”, we should have any images of peoples but WITHOUT ANIMALS.
- In the next class “animals”, we should have images with animals WITHOUT HUMAN.
In this class, including images with the next classes:
dog (different breeds), squirrel (different breeds), horse, chicken, cats, raccoon, deer. - In the last class “other”, we should have any images WITHOUT HUMAN AND ANIMAL.
I created a dataset with 113k. images with 3 classes which I described above.
This dataset was created from a lot of datasets Kaggle platform:
Person:
Animals:
squirrel_data
Contents 6 types of squirrels (fox, grey, red, chipmunk, flying, ground).
www.kaggle.com
Other:
I already created a notebook that already does this. But, if you want run this notebook in colab you need to create datasets manually.
You can just open a notebook in Colab and watch how model training :)
I created a model that has a result for NEW data: 0.008% for loss and 100.00% accuracy. I guess it’s a perfect result.
So link for the notebook here.
Also, I saved the best model file (with format h5) with the best result here.
Result:
- I created a model that has a result for NEW data: 0.008% for loss and 100.00% accuracy. I guess it’s a perfect result.
- link for the notebook here.
- Code for this article available here.
- I saved the best model file (with format h5) with the best result here.