GithubHelp home page GithubHelp logo

object_detection_projects's Introduction

Object Detection Projects

Here i will publish all my example projects that relate to object detection algorithms.

Traffic counting - Traffic counting example based on OpencCV object detection with background subtraction.

Traffic capacity counting - Traffic capacity counting example based on OpencCV.

Face detection in Real-Time with OpenCV and PyQt - A small demo how to use PyQt with OpenCV

Free Course "Object Detection with PyTorch" - aka https://LearnML.today

Subscribe to our Machine Learning blog

Blog Telegram channel

Support

Beside work im trying to help homeless animals, so if you like my work, you can support me https://www.patreon.com/uah

Thanks to people for supporting my work

Esa Loukkola
Praveen Baratam
Clayd Anthoni
Jeff Austin
Artur Rodrigues
Paul Lewis
Arakdiy Kolesnikov

object_detection_projects's People

Contributors

creotiv avatar nikogamulin 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

object_detection_projects's Issues

CV2.VideoCapture("rtsp://... vs skvideo.io.vreader

Hello!
Help me, please.
Try to use cv2 with rtsp, but receiving errors:

Traceback (most recent call last):
File "C:/Users/usr6243828/PycharmProjects/traffic-count/traffic.py", line 120, in
main()
File "C:/Users/usr6243828/PycharmProjects/traffic-count/traffic.py", line 109, in main
pipeline.run()
File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 57, in run
self.context = p(self.context)
File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 379, in call
frame = self.draw_ui(frame, vehicle_count, exit_masks)
File "C:\Users\usr6243828\PycharmProjects\traffic-count\pipeline.py", line 363, in draw_ui
mask = cv2.bitwise_and(_img, _img, mask=exit_mask)
cv2.error: OpenCV(4.3.0) C:\projects\opencv-python\opencv\modules\core\src\arithm.cpp:250: error: (-215:Assertion failed) (mtype == CV_8U || mtype == CV_8S) && _mask.sameSize(*psrc1) in function 'cv::binary_op'

assert _HAS_FFMPEG, “Cannot find installation of ffmpeg.”

Hi,

I have installed all the dependencies and when I am tried to execute the program I am stuck on an error. I did some google but didn’t find any update. can You please help me in this.

The error is

File “C:\Users\Deepu\AppData\Local\Programs\Python\Python35\lib\site-packages\skvideo\io\io.py”, line 240, in vreader
assert _HAS_FFMPEG, “Cannot find installation of ffmpeg.”
AssertionError: Cannot find installation of ffmpeg.

deep learning

Can I use this method of counting in combination with the deep learning detection algorithms like SSD YOLO FRCNN etc? after generating the bounding boxes how can I find the centroid of the objects ?

Counting errors (miss)

Hello Andrey,

Thank a lot for this code it will be very useful for me. I have some questions. Why counting mistakes happen when I use this code on other video?

processed_0018

1* When I set exit green mask at 1280px - 150px, this algorithm count 19 cars (real is 25 cars).
2* When I set exit green mask shorter/longer at 100px or 250px algorithm count 0 cars.

How to properly set up exit mast for counting?

I have example with video for 1* situation.
https://nedrive.live.com/?authkey=%21AH%5Flz73hdY4IXt8&cid=E0A9A985367B002F&id=E0A9A985367B002F%216180&parId=E0A9A985367B002F%216179&o=OneUp

Read live feed from webcam or IP camera

Hello! This project is really awesome and I'm looking to do more related-research based on this repo.
I'm trying to make this work with a live feed of video coming from webcam or RTSP. I read in the code that you tried to use CV2 but had no luck, but I was wondering if you found something at this moment.

I have tried using CV2 but had no luck. even using frames and getting an .mp4 file "on air".
Anyways, thanks for this awesome project!

ValueError: not enough values to unpack (expected 3, got 2)

I cloned the repo and when I tried to run traffic.py got the following error:

Training BG Subtractor...
Traceback (most recent call last):
  File "traffic.py", line 115, in <module>
    main()
  File "traffic.py", line 104, in main
    pipeline.run()
  File "/home/niko/workspace/object_detection_projects/opencv_traffic_counting/pipeline.py", line 59, in run
    self.context = p(self.context)
  File "/home/niko/workspace/object_detection_projects/opencv_traffic_counting/pipeline.py", line 151, in __call__
    context['objects'] = self.detect_vehicles(fg_mask, context)
  File "/home/niko/workspace/object_detection_projects/opencv_traffic_counting/pipeline.py", line 122, in detect_vehicles
    fg_mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_TC89_L1)
ValueError: not enough values to unpack (expected 3, got 2)

Windows Anaconda Error

When I try it with small video file its saved images in out folder and write csv file.
But in the end this error show up:

Traceback (most recent call last):
  File "C:\Users\Dev-PC\Anaconda3\envs\Cars\lib\site-packages\skvideo\io\ffmpeg.py", line 267, in _read_frame_data
    assert len(arr) == framesize
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "traffic.py", line 115, in <module>
    main()
  File "traffic.py", line 80, in main
    for frame in cap:
  File "C:\Users\Dev-PC\Anaconda3\envs\Cars\lib\site-packages\skvideo\io\io.py", line 253, in vreader
    for frame in reader.nextFrame():
  File "C:\Users\Dev-PC\Anaconda3\envs\Cars\lib\site-packages\skvideo\io\ffmpeg.py", line 293, in nextFrame
    yield self._readFrame()
  File "C:\Users\Dev-PC\Anaconda3\envs\Cars\lib\site-packages\skvideo\io\ffmpeg.py", line 277, in _readFrame
    s = self._read_frame_data()
  File "C:\Users\Dev-PC\Anaconda3\envs\Cars\lib\site-packages\skvideo\io\ffmpeg.py", line 271, in _read_frame_data
    raise RuntimeError("%s" % (err1,))
RuntimeError

Request

How to run this code step by step?
I'm newbie here in GitHub and I want to know how to run this program Thanks!

Struggling to install

Apologies this may be a really simple issue but when running pip install - r requirements.txt it cannot find the version on opencv-python version 3.2.0.7 saying only versions 3.4.2.16 and above are available. Any ideas?

AttributeError: module 'utils' has no attribute 'init_logging'

if __name__ == "__main__":
    log = utils.init_logging()

    if not os.path.exists(IMAGE_DIR):
        log.debug("Creating image directory `%s`...", IMAGE_DIR)
        os.makedirs(IMAGE_DIR)

    main()

Output is:

AttributeError: module 'utils' has no attribute 'init_logging'

Did someone faced with same issue?

Issue with binary_op

mask = cv2.bitwise_and(_img, _img, mask=exit_mask)

cv2.error: OpenCV(3.4.1) /tmp/opencv-20180307-60086-ryy1b3/opencv-3.4.1/modules/core/src/arithm.cpp:241: error: (-215) (mtype == 0 || mtype == 1) && _mask.sameSize(*psrc1) in function binary_op

Won't open window

The script traffic.py won't open the winodw of video. Just it excecutes on console/terminal.

StopIteration exception end of video file and Make video does not output video

After the traffic_capacity.py reaches the end of the 'input.mp4' video file, it throws a StopIteration exception as follows:

Traceback (most recent call last):
File "traffic_capacity.py", line 72, in
main()
File "traffic_capacity.py", line 61, in main
cap.next()
StopIteration

Also the make_video.sh file is not creating an output video for traffic capacity example.

Error in traffic.py

Hi,
I am getting error while trying to run traffic.py file from command prompt-
assertion error : Cannnot find installation of ffmpeg

capacity of road

hi!i want to know what are your criteria for judging the capacity of the road and what is the percentage of the shadow area of the vehicle?

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.