Giter Club home page Giter Club logo

rt-motion-detection-opencv-python's People

Contributors

anaph avatar bwsw avatar matthiasrigaud avatar odianosen25 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

rt-motion-detection-opencv-python's Issues

build in anaconda environment

Hello,
Could someone provide instruction about how to build it in anaconda environment, in windows 10? After clone the directory locally, the command 'python setup.py build' ends with error:

running build
error: [WinError 2] The system cannot find the file specified

Does that mean the setup.py is not calling conda-build? then how to build?

Thanks

How to use

Hello @bwsw,

I will like to use some of your functions within another project of mine, but I am trying to understand how they work; especially the pack. I do understand it takes a bunch of rects which indicates the different contours found as motion, and combines them based on distance right?

I found myself in similar issues when building a project, and though I used non-maxima suppression to combine those that overlap, it didn't work for close ones and still led to having lots of disjointed contours. Looking at your pack code, I believe it will solve the issue for me.

So please I am asking if there is a way to explain a bit more what is passed into it. As I can't seem to get what the bins is all about. Then why the extra copy_images function.

I am sorry I don't really understand C code, so why the extra confusion. I know its a lot to ask, but understanding it will really help.I have spent a lot of time trying to, but to no avail.

Kind regards

Is it possible to use without numba?

I would like to try this lib on a Raspberry Pi 3, and as far as I see it, numba on that platform requires either that I use some special distribution "berryconda" which I never heard of before, or a very complicated compilation process. Is this lib strictly needed, and would it be possible to make a version that doesnt use it?

Pip Install

Hello,

Thanks for this nice code. Any plans to make it easily pip install-able? Will like to use it within a docker environment, but as it is now, for some reasons being difficult for me to install.

Tried using

pip3 install git+https://github.com/bwsw/rt-motion-detection-opencv-python

tells me

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/bwsw/rt-motion-detection-opencv-python
  Cloning https://github.com/bwsw/rt-motion-detection-opencv-python to /tmp/pip-req-build-78890b7e
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/motion_detector_optimization.egg-info
    writing pip-egg-info/motion_detector_optimization.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/motion_detector_optimization.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/motion_detector_optimization.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/motion_detector_optimization.egg-info/SOURCES.txt'
    error: package directory 'opti_module' does not exist

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-78890b7e/

This message pops up both in Windows and Ubuntu

Kind regards

Error when build the project

Hello, i got a problem when i try to follow your guide in step build the project:

rt-motion-detection-opencv-python# python3.7 setup.py build

running build
gcc -c src/scanner.c -o src/scanner.o -W -Wall -Werror -Wextra -fPIC -O3 `pkg-config --cflags python3` -Isrc -I`python3 -m site --user-site`/numpy/core/include
src/scanner.c:5:11: fatal error: numpy/arrayobject.h: No such file or directory
 # include "numpy/arrayobject.h"
           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:44: recipe for target 'src/scanner.o' failed
make: *** [src/scanner.o] Error 1

Thank you for your work.

Best regard

Exception has occurred: IndexError list index out of range

@bwsw Hi, thank you for providing such a tool. However, there seems to be a bug for the lambda function you are using.

Exception has occurred: IndexError
list index out of range
  File "....../motiondetector.py", line 42, in <lambda>
    box_filter=lambda b: ((b[2] - b[0]) * (b[3] - b[1])) > 1000,
  File "....../packer.py", line 11, in pack_images
    if box_filter(b):
  File "....../motiondetector.py", line 37, in <module>
    results, box_map = pack_images(

It looks like when b is empty, b[0], b[1], b[2], b[3] are just meaningless..
I'm moving out the lambda function...

Cheers
Pei

Packer boxes mapping

I've made some experiments with your code and found out an error in packer.py:

box_map.append((b, (x, y, x + w, y + h), (rid[1], rid[0], rid[3], rid[2])))

should be

box_map.append((b, (x, y, x + w, y + h), (rid[0], rid[1], rid[2], rid[3])))

for correct mapping with original box coordinates.

Error when building the project

when I run the make command on wondows 10 I get the following errors:

Makefile:44: warning: ignoring prerequisites on suffix rule definition
gcc -c src/scanner.c -o src/scanner.o -W -Wall -Werror -Wextra -fPIC -O3 pkg-config --cflags python3 -Isrc -Ipython3 -m site --user-site/numpy/core/include
gcc: error: pkg-config: No such file or directory gcc: error: python3: No such file or directory
gcc: error: site: No such file or directory
gcc: error: unrecognized command line option '--cflags'
gcc: error: unrecognized command line option '-m'
gcc: error: unrecognized command line option '--user-site`/numpy/core/include'
make: *** [Makefile:44: src/scanner.o] Error 1

"libmotion_detector_optimization.so" File Build error.

Hi!
I am facing this issue while build
running build Makefile:44: warning: ignoring prerequisites on suffix rule definition gcc src/scanner.o src/coord_list.o src/find_bounding_boxes.o src/bounding_box_data_struct.o src/packer.o src/packer_data_structs.o -o ./bounding_boxes/bin/libmotion_detector_optimization.so -shared pkg-config --libs python3/usr/bin/ld: /usr/local/lib/libpython3.6m.a(exceptions.o): warning: relocation againstPyExc_RecursionError' in read-only section .text' /usr/bin/ld: /usr/local/lib/libpython3.6m.a(listobject.o): relocation R_X86_64_PC32 against symbol _Py_NoneStruct' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:33: bounding_boxes/bin/libmotion_detector_optimization.so] Error 1
`

@bwsw

Getting Segmentation Fault 11

Hi,

I'm trying to test your algorithm, on mac os x, compiled the c parts successfully, Python 3.7.7
All required libraries installed.

I'm executing the program but I'm always getting segmentation fault 11.

/usr/local/bin/python3.7 /Users/XXX/PycharmProjects/rt-motion-detection/sample.py
StdDev: 0.0000 Mean: 6.9940 Boxes found: 0
StdDev: 0.8925 Mean: 6.1015 Boxes found: 0
StdDev: 0.8986 Mean: 5.7298 Boxes found: 0
StdDev: 0.7841 Mean: 5.6745 Boxes found: 0
StdDev: 0.7151 Mean: 5.6046 Boxes found: 0
StdDev: 0.6545 Mean: 5.5836 Boxes found: 0
StdDev: 0.6067 Mean: 5.5707 Boxes found: 0

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

UPDATE:

Added import faulthandler; faulthandler.enable()

I'm getting this:

Current thread 0x000000011bcee5c0 (most recent call first):
File "/Users/XXX/PycharmProjects/rt-motion-detection/bounding_boxes/init.py", line 23 in scan
File "/Users/XXX/PycharmProjects/rt-motion-detection/detector.py", line 119 in __get_movement_zones
File "/Users/XXX/PycharmProjects/rt-motion-detection/detector.py", line 109 in detect
File "sample.py", line 32 in
Segmentation fault: 11

I haven't changed the default values.

Hope you guys can give me a hand.

Best,

Hugo

WinError2 on build

Hi, how do I use your code on Windows?

If I either try to run the setup.py build or call make I get this WinError 2.

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.