Comments (4)
As you've modified the code, it is difficult to help you as I don't know what you've done.
However, from the error thrown, it seems as if the issue may be due to the difference between Python 2 and 3 in the way it treats the non-string join
. I would check the python 3 documentation for join
. It may be just a case of making the empty string a byte, e.g.
self.url = b"".join((self.url, "/image/", self.name))
(note that the above has not been tested)
from blueiris_enhancedobjectdetect.
As you've modified the code, it is difficult to help you as I don't know what you've done.
You are totally right, I wrote that up at 1am totally not expecting an answer. lol But thank you so much for replying! From this point I decided to go ahead and make a fork so I can share the modifications. Honestly though, I Do Not know Python, I just ran it and searched for each error along the way to get it working with the newer versions.
However, from the error thrown, it seems as if the issue may be due to the difference between Python 2 and 3 in the way it treats the non-string join. I would check the python 3 documentation for join. It may be just a case of making the empty string a byte, e.g.
I did come across this as the likely cause when searching for the error it returned (which seems kind of obvious when just reading the error) but sadly, because I am lacking severely in Python I could not manage to get past it after a couple of hours attempting different examples. I should have also noted that last night I changed it to the following and it kind of worked, it let me continue to find other code that needed modifying.
self.url = "".join((self.url, "/image/livingroom-hdt"))
(obviously this only works for the one camera but just testing)
It seems self.name
keeps returning binary instead of a string. This is where I kept getting caught up as I don't know how to correct this. The example code you gave did not resolve this as well.
After attempting a run in Python 2.7 (which has its own issues, still) I did notice that it doesn't return the camera name the same in 3.8 versions.
DEBUG] Camera 'b'livingroom-hdt''
There is one more issue I came across after forcing the self.name, same issue that happens with Python 2.7 and I believe might have more to do with MQTT but I'm not 100% sure. During a trigger I receive the following:
======================================================
Person Detection system started
Modelling System: TF
Importing TensorFlow (may take a few seconds)
2020-10-20 18:22:07.231758: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_110.dll
Loading model from folder 'TF' (may take some time)...
2020-10-20 18:22:18.693223: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll
2020-10-20 18:22:18.758844: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:06:00.0 name: GeForce GTX 1650 computeCapability: 7.5
coreClock: 1.68GHz coreCount: 14 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 119.24GiB/s
2020-10-20 18:22:18.779084: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_110.dll
2020-10-20 18:22:18.797761: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_11.dll
2020-10-20 18:22:18.813015: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-20 18:22:18.825380: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-20 18:22:18.848300: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-20 18:22:18.864687: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_11.dll
2020-10-20 18:22:18.876301: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_8.dll
2020-10-20 18:22:18.887318: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-20 18:22:18.912604: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1bc5d1827d0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-10-20 18:22:18.927763: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2020-10-20 18:22:18.936531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties:
pciBusID: 0000:06:00.0 name: GeForce GTX 1650 computeCapability: 7.5
coreClock: 1.68GHz coreCount: 14 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 119.24GiB/s
2020-10-20 18:22:18.954546: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_110.dll
2020-10-20 18:22:18.963924: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_11.dll
2020-10-20 18:22:18.974022: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll
2020-10-20 18:22:18.984056: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll
2020-10-20 18:22:18.995234: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll
2020-10-20 18:22:19.006508: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusparse64_11.dll
2020-10-20 18:22:19.017077: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_8.dll
2020-10-20 18:22:19.027021: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1858] Adding visible gpu devices: 0
2020-10-20 18:23:38.156601: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-10-20 18:23:38.167920: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] 0
2020-10-20 18:23:38.173339: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1276] 0: N
2020-10-20 18:23:38.181015: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1402] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2909 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1650, pci bus id: 0000:06:00.0, compute capability: 7.5)
2020-10-20 18:23:38.205837: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1bca0dc4630 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-10-20 18:23:38.221707: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1650, Compute Capability 7.5
Model initalised. Connecting to mqtt server 192.168.5.158
Subscribing to mqtt topic 'BlueIris/alert'
MQTT connection established with broker
2020-10-20 18:23:52 'b'livingroom-hdt'' camera alert triggered
[DEBUG] Calling image processing function...
[DEBUG] 'do_detect' function called for camera 'b'livingroom-hdt''
[DEBUG] Camera 'b'livingroom-hdt'' not present in existing collection. Instantinating new instance
[DEBUG] Search objects for camera 'b'livingroom-hdt'': Person
[DEBUG] New camera 'b'livingroom-hdt'' added to dictionary
[DEBUG] Downloadinge image from BlueIris
[DEBUG] Getting image from BlueIris url: http://192.168.5.156:81/image/livingroom-hdt?user=user&pw=password&q=100&s=100
[DEBUG] [ImageFrame.get_image_from_camera] Image width: 960, height: 720
[INFO ] Image downloaded from BI (1.13 seconds) [960 x 720]
[DEBUG] Calling 'process_tensorflow'
[DEBUG] TensorFlow: Classifying frame contents from camera 'b'livingroom-hdt'' (may take some time depending on CPU/GPU)
2020-10-20 18:24:02.153384: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cublas64_11.dll
2020-10-20 18:24:03.207944: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudnn64_8.dll
2020-10-20 18:24:05.259621: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: Invoking GPU asm compilation is supported on Cuda non-Windows platforms only
Relying on driver to perform ptx compilation.
Modify $PATH to customize ptxas location.
This message will be only logged once.
2020-10-20 18:24:07.885390: W tensorflow/core/common_runtime/bfc_allocator.cc:246] Allocator (GPU_0_bfc) ran out of memory trying to allocate 3.51GiB with freed_by_count=0. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available.
2020-10-20 18:24:08.192920: W tensorflow/core/common_runtime/bfc_allocator.cc:246] Allocator (GPU_0_bfc) ran out of memory trying to allocate 2.93GiB with freed_by_count=0. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory were available.
[DEBUG] Frame content classification took 19.4983 seconds
[DEBUG] Reviewing classfications for detected objects (7)
[DEBUG] Completed TF processing. Returning to calling function
[DEBUG] Returned from detection API function. Processing identified objects
[INFO ] Analysis complete. No motion detected (20.64 seconds overall)
Unexpected disconnection.
[DEBUG] mqtt rc: 1, userdata: None, client: <paho.mqtt.client.Client object at 0x000001BC4C8EEB80>
MQTT connection established with broker
Near the end, the Unexpected Disconnect. I can not find what is causing it as it doesn't give me enough information. I also have to stop the program and restart it to have it accept new triggers. Scaling doesn't seem to work either... When entering the URL into a browser it seems the scaling is a percentage now but even 100 doesn't match the resolution TensorFlow receives and neither are what the camera produces. I just now enabled saving the original and processed images, noticed I only end up with the original.
I'll do some reading through the Python docs to see if I can figure out the binary thing, the rest is going to end up stopping me eventually as well... Again, I can't thank you enough for helping on this, your program is my best hope at getting TensorFlow to work on Windows with Blue Iris.
from blueiris_enhancedobjectdetect.
Sorry, I don't think I can help much further, as it could be any number of issues, especially with your migration to python 3.
However, I will upload shortly my internal python3 version, which may save you some effort. Good luck!
from blueiris_enhancedobjectdetect.
I think I figured out what could be causing it, I'll just need to work on it some. Again thank you for helping out.
I am excited to try out your version, thanks!
from blueiris_enhancedobjectdetect.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blueiris_enhancedobjectdetect.