Coder Social home page Coder Social logo

custom model about hassio-addons HOT 3 OPEN

snowzach avatar snowzach commented on August 18, 2024
custom model

from hassio-addons.

Comments (3)

snowzach avatar snowzach commented on August 18, 2024

I don't recall how to do it.. I feel like I put it in /share/models... And then maybe you put /share/models/filename in the config for the mode file? I'm going off memory from like several years ago...

from hassio-addons.

snowzach avatar snowzach commented on August 18, 2024

Yes, put the model in /share/models... and then update the config model path to be /share/model/filename...

from hassio-addons.

Innocentius-alt avatar Innocentius-alt commented on August 18, 2024

Thank you!! Your advice works and it made me happy but not for long((.
I bumped another issue. It shows error and stop works after i call image_processing.scan service.
With default model it works properly.

I was training my model following this instruction on google colab:

https://colab.research.google.com/github/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Train_TFLite2_Object_Detction_Model.ipynb

Please, friend, look at the logs below and help me out again. Thanks for the insight and sorry for disturb.
`
2023-09-21 12:02:37,913 - doods.doods - INFO - Registered detector type:tflite name:default
2023-09-21 12:02:45,410 - doods.doods - INFO - Registered detector type:tensorflow name:tensorflow
2023-09-21 12:02:45,414 - doods.doods - ERROR - Could not create detector pytorch/pytorch: Unknown detector type pytorch.
2023-09-21 12:02:45,675 - uvicorn.error - INFO - Started server process [7]
2023-09-21 12:02:45,678 - uvicorn.error - INFO - Waiting for application startup.
2023-09-21 12:02:45,679 - uvicorn.error - INFO - Application startup complete.
2023-09-21 12:02:45,682 - uvicorn.error - INFO - Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

2023-09-21 12:03:10,367 - uvicorn.access - INFO - 192.168.1.73:53412 - "POST /detect HTTP/1.1" 500
2023-09-21 12:03:10,373 - uvicorn.error - ERROR - Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 208, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 169, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/middleware.py", line 167, in call
await self.app(scope, receive, send_wrapper)
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app
response = await func(request)
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 159, in run_endpoint_function
return await dependant.call(**values)
File "/opt/doods/api.py", line 47, in detect
detect_response = self.doods.detect(detect_request)
File "/opt/doods/doods.py", line 139, in detect
ret = detector.detect(image)
File "/opt/doods/detectors/tflite.py", line 78, in detect
input_data = (np.float32(self.input_data) - input_mean) / input_std
AttributeError: 'TensorflowLite' object has no attribute 'input_data''`

from hassio-addons.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.