AI: Animal pet detection #1122

Open
opened 2026-02-20 00:06:34 -05:00 by deekerman · 11 comments
Owner

Originally created by @ServerGeek82 on GitHub (Sep 28, 2021).

Just a thought. Future feature. Had a picture of my dog and it got recognized in the faces. A cat as well. Also had a face match on a green plastic cup. And the funniest was a person in a bunny outfit for an Easter picture. Running the reindexing for the library testing it's capabilities with the new face detection. First of all. Awesome.

32,000+ images / videos from decades of pictures and a few misses of my kiddos. But that is because it's missing some of the similarities, and differences.

Originally created by @ServerGeek82 on GitHub (Sep 28, 2021). Just a thought. Future feature. Had a picture of my dog and it got recognized in the faces. A cat as well. Also had a face match on a green plastic cup. And the funniest was a person in a bunny outfit for an Easter picture. Running the reindexing for the library testing it's capabilities with the new face detection. First of all. Awesome. 32,000+ images / videos from decades of pictures and a few misses of my kiddos. But that is because it's missing some of the similarities, and differences.
Author
Owner

@graciousgrey commented on GitHub (Sep 28, 2021):

Good to hear that you like the facial recognition :).
I personally would love to have pet detection as well (ideally one that can separate my two black cats ;)).
But it will take a while... we have many tasks with higher priority

@graciousgrey commented on GitHub (Sep 28, 2021): Good to hear that you like the facial recognition :). I personally would love to have pet detection as well (ideally one that can separate my two black cats ;)). But it will take a while... we have many tasks with higher priority
Author
Owner

@heisenberg2980 commented on GitHub (May 8, 2022):

Another vote for this one, it would be really cool to be able to filter pictures of our pets

@heisenberg2980 commented on GitHub (May 8, 2022): Another vote for this one, it would be really cool to be able to filter pictures of our pets
Author
Owner

@mateuszdrab commented on GitHub (Jun 16, 2022):

I've just started evaluating Photoprism today, face detection is impressive but object classification, not so well.
I think a better TF model is needed - which would make sense once Coral support is added https://github.com/photoprism/photoprism/issues/536

Example of an identified Dog:
image

@mateuszdrab commented on GitHub (Jun 16, 2022): I've just started evaluating Photoprism today, face detection is impressive but object classification, not so well. I think a better TF model is needed - which would make sense once Coral support is added https://github.com/photoprism/photoprism/issues/536 Example of an identified Dog: ![image](https://user-images.githubusercontent.com/26556541/174118585-7e7a459e-2813-4e9f-b4b3-5fcdfc68e9e5.png)
Author
Owner

@lastzero commented on GitHub (Jun 19, 2022):

It could almost be a dog. In order to find as many dogs as possible, we lowered the probability threshold for this label as we felt that was an acceptable compromise. I take note you see it differently.

@lastzero commented on GitHub (Jun 19, 2022): It could almost be a dog. In order to find as many dogs as possible, we lowered the probability threshold for this label as we felt that was an acceptable compromise. I take note you see it differently.
Author
Owner

@mateuszdrab commented on GitHub (Jun 19, 2022):

I get it, despite this, I have loads of photos of my actual dog which it didn't recognize.
Sometimes two similar photos where one is and one isn't recognized.

I'd like to try out the large version of the current model instead of the mobile one, just to see if it makes things better... It's a huge size difference of 20MB vs >300MB so I'd expect better results from it.
I mentioned this on the gitter chat actually.

@mateuszdrab commented on GitHub (Jun 19, 2022): I get it, despite this, I have loads of photos of my actual dog which it didn't recognize. Sometimes two similar photos where one is and one isn't recognized. I'd like to try out the large version of the current model instead of the mobile one, just to see if it makes things better... It's a huge size difference of 20MB vs >300MB so I'd expect better results from it. I mentioned this on the [gitter chat](https://gitter.im/browseyourlife/community?at=62ab592c7df86c141eda8d0f) actually.
Author
Owner

@lastzero commented on GitHub (Jun 19, 2022):

Let us know about the results. Based on the stats and my experience, the difference is minimal. For TF acceleration and upgrade, watch the TensorFlow 2 issue / read its comments.

@lastzero commented on GitHub (Jun 19, 2022): Let us know about the results. Based on the stats and my experience, the difference is minimal. For TF acceleration and upgrade, watch the TensorFlow 2 issue / read its comments.
Author
Owner

@mateuszdrab commented on GitHub (Jun 20, 2022):

I would, but I couldn't get the model to work by simply swapping files.

I was getting this error:
16T15:33:04Z" level=error msg="index: Could not find meta graph def matching supplied tags: { photoprism }. To inspect available tag-sets in the SavedModel, please use the SavedModel CLI: saved_model_cli"

Can you provide some instructions/pointers on whether a straight replacement of the model files should work or perhaps it needs to be rebuilt?

@mateuszdrab commented on GitHub (Jun 20, 2022): I would, but I couldn't get the model to work by simply swapping files. I was getting this error: `16T15:33:04Z" level=error msg="index: Could not find meta graph def matching supplied tags: { photoprism }. To inspect available tag-sets in the SavedModel, please use the SavedModel CLI: saved_model_cli"` Can you provide some instructions/pointers on whether a straight replacement of the model files should work or perhaps it needs to be rebuilt?
Author
Owner

@lastzero commented on GitHub (Jun 20, 2022):

Yep, sadly it's not as easy why developing this software took so long. The Go library needs a named save point which you have to use Python for to create. Also you have to change the code that passes the image thumbnails to TF as the resolution of this model is different.

@lastzero commented on GitHub (Jun 20, 2022): Yep, sadly it's not as easy why developing this software took so long. The Go library needs a named save point which you have to use Python for to create. Also you have to change the code that passes the image thumbnails to TF as the resolution of this model is different.
Author
Owner

@mateuszdrab commented on GitHub (Jun 21, 2022):

That makes sense, I may try to tinker around with it see if I can recompile for the larger model.
Just curious if it would make a difference, in theory it should since it's a higher resolution model.

@mateuszdrab commented on GitHub (Jun 21, 2022): That makes sense, I may try to tinker around with it see if I can recompile for the larger model. Just curious if it would make a difference, in theory it should since it's a higher resolution model.
Author
Owner

@lastzero commented on GitHub (Jun 21, 2022):

Basically all models use square thumbnails, so it would be good to know if you find any connection between false negatives and the image format, in particular subject (dog) size or position. Because you can easily magnify parts of an image, a higher resolution is not as big an advantage as it seems. We already use three different crops, so the logical step would be to use more in different sizes and positions instead of switching to a much larger and slower model that significantly increases the overhead when doing this. Using multiple crops is a scientifically verified approach, I recommend reading a few papers as common sense doesn't really work for machine learning. Much is art.

@lastzero commented on GitHub (Jun 21, 2022): Basically all models use square thumbnails, so it would be good to know if you find any connection between false negatives and the image format, in particular subject (dog) size or position. Because you can easily magnify parts of an image, a higher resolution is not as big an advantage as it seems. We already use three different crops, so the logical step would be to use more in different sizes and positions instead of switching to a much larger and slower model that significantly increases the overhead when doing this. Using multiple crops is a scientifically verified approach, I recommend reading a few papers as common sense doesn't really work for machine learning. Much is art.
Author
Owner

@pgalbavy commented on GitHub (Dec 27, 2023):

Too. Many. Cats.

Actually, never enough, but too many cat photos for sure. Would be good to be able to apply a model to them :-)

@pgalbavy commented on GitHub (Dec 27, 2023): Too. Many. Cats. Actually, never enough, but too many cat photos for sure. Would be good to be able to apply a model to them :-)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1122
No description provided.