Git Product home page Git Product logo

ai-ipcam's People

Contributors

mharizanov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ai-ipcam's Issues

Error - ValueError: Shape must be rank 4 but is rank 2 for 'Pad_7' (op: 'Pad') with input shapes: [?,1024], [4,2].

(python36) unraid@unraid-ubuntu:~/Desktop/projects/AI-ipcam$ python ai-ipcam.py
Watching for: ['person', 'cat', 'dog', 'bird']
Stream: 'rtsp://192.168.X.XXX/ch0_0.h264'
MQTT broker: '192.168.X.XX'
MQTT topic: 'yicam/motion2'
Show image: 'yes'
Parsing ./cfg/darknet.cfg
Parsing cfg/darknet.cfg
Loading cfg/darknet.weights ...
Successfully identified 29293936 bytes
Finished in 0.006495475769042969s

Building net ...
Source | Train? | Layer description | Output size
-------+--------+----------------------------------+---------------
| | input | (?, 256, 256, 3)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 256, 256, 16)
Load | Yep! | maxp 2x2p0_2 | (?, 128, 128, 16)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 128, 128, 32)
Load | Yep! | maxp 2x2p0_2 | (?, 64, 64, 32)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 64, 64, 64)
Load | Yep! | maxp 2x2p0_2 | (?, 32, 32, 64)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 32, 32, 128)
Load | Yep! | maxp 2x2p0_2 | (?, 16, 16, 128)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 16, 16, 256)
Load | Yep! | maxp 2x2p0_2 | (?, 8, 8, 256)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 8, 8, 512)
Load | Yep! | maxp 2x2p0_2 | (?, 4, 4, 512)
Load | Yep! | conv 3x3p1_1 +bnorm leaky | (?, 4, 4, 1024)
Load | Yep! | avgpool() | (?, 1024)
Traceback (most recent call last):
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1589, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 4 but is rank 2 for 'Pad_7' (op: 'Pad') with input shapes: [?,1024], [4,2].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "ai-ipcam.py", line 88, in
tfnet = TFNet(options)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/darkflow/net/build.py", line 75, in init
self.build_forward()
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/darkflow/net/build.py", line 115, in build_forward
state = op_create(*args)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/darkflow/net/ops/init.py", line 27, in op_create
return op_typeslayer_type
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/darkflow/net/ops/baseop.py", line 42, in init
self.forward()
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/darkflow/net/ops/convolution.py", line 69, in forward
temp = tf.pad(self.inp.out, [[0, 0]] + pad + [[0, 0]])
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1881, in pad
result = gen_array_ops.pad(tensor, paddings, name=name)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 4681, in pad
"Pad", input=input, paddings=paddings, name=name)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3414, in create_op
op_def=op_def)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1756, in init
control_input_ops)
File "/home/unraid/anaconda3/envs/python36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1592, in _create_c_op
raise ValueError(str(e))
ValueError: Shape must be rank 4 but is rank 2 for 'Pad_7' (op: 'Pad') with input shapes: [?,1024], [4,2].

bad_alloc error in pi ( off topic )

Sorry this is not about an issue about your code, but something related to running darkflow trained models in pi.
I have trained a model to detect number plates and saved the model using save_pb. Everything works fine in my PC. I ran the same on pi 3B+. But this error was shown when loading the pb and meta files.

terminate called after throwing an instance of 'std::bad_alloc' what():  std::bad_alloc
Aborted

I think this is an issue with RAM. So increased the swap file size from 100M to 1024M. The model got loaded now. But it is not wise to leave the swap file size that large since it burns out the sd card.
Any suggestions from you side will be helpful.
TIA

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.