Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating custom component #798

Open
ZeyadAyman1 opened this issue Aug 14, 2024 · 1 comment
Open

Creating custom component #798

ZeyadAyman1 opened this issue Aug 14, 2024 · 1 comment

Comments

@ZeyadAyman1
Copy link

Hello, Firstly i wanted to thank you for putting so much effort in making such a project and making it open source.
I have a question regarding the components, in case i have my own object detection model like a custom trained yolov5 model or something, how can i use it and is there a way to make custom components for customized object detection, face recognition or any task ?

@roflcoopter
Copy link
Owner

Depends on what format your YOLOv5 model is in. If you can convert it to Darknet weights then it can be used.
Otherwise a new component for Ultralytics has to be created (and i currently dont have enough time to do that sadly)

It should be fairly easy to create a custom component. When starting the docker container all you have to do is mount your custom component to the folder /src/viseron/components/your_component_name

If you want a simple example of how a component works you can check the source for the compreface component here: https://github.com/roflcoopter/viseron/blob/dev/viseron/components/compreface/__init__.py
There is sadly no good documentation on this yet.

The key take away is that if a CONFIG_SCHEMA variable is available Viseron will automatically check it for you.
If the config check passes it calls the setup method for the component where you are free to do whatever you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants