No errors in log file and no errors when i install the addon, this happens to more people.
If I do not install the addon but if I put the component, it starts. If I install the addon, I have to comment on the graph line so that it starts up and gives error when not finding the file. The route is correct so I don’t know what it can be.
I’m receiving the same results as you guys. HA simply doesn’t boot if the image_processing portion in my config. My YAML looks identical to yours. If you find a fix, please let me know!
Hi all, forgive my noobness but I have installed tensorflow, im using hass.io docker in Ubuntu server on a nuc. I have tried to boot it up and i get this in my .log file
2019-08-30 17:31:32 ERROR (MainThread) [homeassistant.components.image_processing] Error while setting up platform tensorflow
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/tensorflow/image_processing.py", line 114, in setup_platform
detection_graph = tf.Graph()
AttributeError: module 'tensorflow' has no attribute 'Graph'
Hi,
I have HASSIO runing on intel NUC I3.
Intalled TF from repo using the addon, extraced files and placed in /config follwoing instrucitons.
I am having the same issue where HA would not startup at all when imageprocessing is placed in yaml file.
Thanks you for your feedback.
I have deleted the dep folder and removed the addon (using uninstall button).
So now HASSIO boot but i am getting the following error:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/tensorflow/image_processing.py", line 303, in process_image
import cv2 # pylint: disable=import-error
ModuleNotFoundError: No module named 'cv2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 439, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 136, in async_update
await self.async_process_image(image.content)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/tensorflow/image_processing.py", line 312, in process_image
img = Image.open(io.BytesIO(bytearray(image))).convert("RGB")
File "/usr/local/lib/python3.7/site-packages/PIL/Image.py", line 2822, in open
raise IOError("cannot identify image file %r" % (filename if filename else fp))
OSError: cannot identify image file <_io.BytesIO object at 0x7f7fb6675350>
Trying to use the local.file component to feed a picture to Tensorflow does work:
- platform: local_file
file_path: /config/www/test.jpg
name: living room camera
So it look like TF is working but but not with the camera stream.
I am using a generic ip camera compent to stream rtsp feed from my wyze cam.
Does anyone has issues with this camera coponent?
My camera configuration looks like this:
- platform: generic
name: Living room camera
still_image_url: https://still_image_url_from_motion_eye
stream_source: rtsp://username:[email protected]/live
Are there any options for this coponent to optimize it for Tensorflow or shell i use a different component?
I’m having the same problem, TF doesn’t appear to like using my camera as a source.
The logs show;
Update for image_processing.tensorflow_driveway_camera fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/tensorflow/image_processing.py", line 303, in process_image
import cv2 # pylint: disable=import-error
ModuleNotFoundError: No module named 'cv2'
This is using the HA docker image, with nothing additional done to it (short of placing the required files in /config/tensorflow).
Is anyone able to confirm that OpenCV should be working in the Hassio docker image (0.99.2)?
You do not need to install cv2, the addon can handle without it.
This indicates TF does not pick the snapshot from the camera.
When i had this issue first i checked if the integration works simply by feeding jpg image to camera.local integration and observing if it’s anlyzed properly. If it does then your camera configuraiton is not correct probably.
Thanks - I haven’t had chance to check again yet, but I suspect like you mine will probably work OK with the local file.
Did you manage to get yours working with a generic camera entity? - I have tried specifying a few of my cameras (all added via the generic camera component) and none work, they all fail with the ‘update for image fails’ error in my last post - yet the camera itself shows fine within HomeAssistant…
-Edit, I’ve now had chance to test it with a ‘local file’ camera and as suspected it works flawlessly…
So, what’s the magic to get this going with the ‘generic camera’ component ?
Use the mjpeg camera without the snapshot url to stream from motioneye addon:
camera:
- platform: mjpeg
name: Living room camera
mjpeg_url: <http://YOUR HASSIO LOCAL IP>:<STREAMING PORT FOR THIS CAMERA>
username: <MOTIONEYE USER (not admin)>
password:< MOTIONEYE USER PASSWORD>
The stream shell be configured in motioneye (not directly from the camera).
This is how it worked for me.
Hope this helps.
I did some digging tonight and managed to get it working with the generic camera component.
Turns out the issue was down to my camera having a security setting set to ‘digest’ login only - when I change this to ‘digest & basic’ the image processing component can pull the images OK.