Open pierluigizagaria opened 1 year ago
Name | Link |
---|---|
Latest commit | 1467d4aa6ca20be8bee939210e44df19e65f4706 |
Latest deploy log | https://app.netlify.com/sites/viseron/deploys/6462330abfe0600008a6bbe9 |
Deploy Preview | https://deploy-preview-605--viseron.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
6.6% Duplication
Awesome, thanks! Will have a look at the code in the coming days
I think you have to do some changes in order for this to work correctly. Calling vis.add_entity each time a face is recognized wont work well, as it will add a new entity each time a persons face is recognized.
I think the best way is to call an API endpoint here: https://github.com/roflcoopter/viseron/blob/dev/viseron/domains/face_recognition/__init__.py#L90 which lists each face and you can then create entities the same way as it works for the file system. You can create an abstract method in that class that the subclass in the compreface component can override which should return a list of names to track. This will also allow components which cant support this feature (dlib for instance) to simply not implement this method and instead log an error saying it is unsupported.
It is also a good idea to move the detect_remote_faces
option into the BASE_CONFIG_SCHEMA here: https://github.com/roflcoopter/viseron/blob/dev/viseron/domains/face_recognition/__init__.py#L36
Then you dont have to duplicate it on all components.
Let me know if i need to explain further!
I added a comment. When timer expires face is not removed from the _faces dict. This prevent the registration of the entity on every detection. I thought about calling the api but the problem was that new faces trained would require a restart of Viseron to re-register the component and download the new faces
Ahh i see now. I still think it would be better to fetch them during startup so it behaves like locally trained faces. We could add a way to refresh the faces using the GUI/API in the future. Maybe even refresh automatically on an interval
Adds
detect_remote_faces
to face_recognition domain. The purpose of the config is to enable the face_recognition components to detect faces that are trained in other ways as I mentioned in #604For example in my case I would like to continue train Compreface using the native UI. I wanted to make this config available only for Compreface but was difficult for me on how the logic is currently implemented. Then I thought that this behavior could be useful even on other face recognition components.
This PR also fixes the error occured in #603 by checking the existence of the train dir.