Damselfly icon indicating copy to clipboard operation
Damselfly copied to clipboard

Investigate using EMGUCV for Object Detection

Open Webreaper opened this issue 4 years ago • 7 comments

The Yolo3 code I'm using isn't that great, so it would be better to re-use the EMGUCV libraries for object detection. Need to investigate. This might help with #334 too.

Webreaper avatar Feb 10 '22 10:02 Webreaper

Hey, first of all thanks for your work on this project!

Unfortunately I also get the segmentation faults as described in #334 - even without CPU pinning, just any AI object detection immediately triggers it. While I also like the project in general the object detection was pretty much the main reason why I installed it in the first place :-(

So is there any ETA for this? Will definitely watch this here and revisit as soon as the problem is fixed. Thanks!

YorVeX avatar Nov 22 '22 20:11 YorVeX

Have you tried the Dev version? There's a lot of dependency upgrades and fixes, and I also moved all the image/bitmap stuff to use ImageSharp. Can you try pulling webreaper/damselfly:dev and tell me if it looks any better for you?

Converting to use EMGUCV instead of the existing Yolo code is potentially on my list, but probably not a high priority at the moment, I'm afraid.

Webreaper avatar Nov 22 '22 21:11 Webreaper

At least it looks promising for now, the dev version hasn't crashed yet while working on my 32,000 photos for the last 21 hours: image

But it also isn't finished and I can't seem to find any progress bar or something that would give me a feeling whether it's still at the beginning or will be finished soon, it's only the rotating cog wheel saying "AI processing" in the status. I guess I just have to be patient.

YorVeX avatar Nov 23 '22 20:11 YorVeX

That is promising. If you click the 'i' button in the bottom right, and click the 'status' tab it'll show you some stats which will give and indication of progress.

Webreaper avatar Nov 23 '22 21:11 Webreaper

image Ah, thanks! Looks like it's finished soon. I guess it's also a bit slow since it doesn't really utilize the CPU despite me having set the CPU usage limit to 100% unrestricted: image

Is it normal that it doesn't list any faces or people identified at this stage and just says 0? When I toggle the AI view for some pics that have already been processed I get borders saying "person" or "unidentified face" but also the "People Management" button at the top just says "There are no people currently listed in Damselfly."

YorVeX avatar Nov 23 '22 21:11 YorVeX

The CPU thing is interesting. I made a small tweak recently because it was killing somebody else's CPU. ;)

Have you set up an Azure Face account? It'll only do face recognition with Azure. Without that it'll do face detection.

Although you said it has some that say "Unidentified face"? That sounds like you've set up Azure.... it may be that the face cache hasn't been updated (which I think it does when it finishes AI scanning). That's one thing on my list to tidy up.

Webreaper avatar Nov 23 '22 21:11 Webreaper

Ah, I didn't know about this, I thought Azure was optional to just have the face recognition a bit improved compared to the local variant. So I guess that's the reason. I don't really want my photos uploaded to another cloud service though (even when MS would probably say they don't store them, sure....) so I will have to live without. Also I wonder whether Damselfly would only have the pics run through the Azure API that it detected a face in before - if not and instead sends them all then the free 30K API calls for the whole month wouldn't even be enough for the whole collection. And it's not even complete yet, I have yet to throw more pictures in there :D

YorVeX avatar Nov 23 '22 21:11 YorVeX