Giter Site home page Giter Site logo

Comments (18)

saimj7 avatar saimj7 commented on August 15, 2024

Hi, you need to install CMake and add its directory to the path environment variable: https://cmake.org/install/

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

@saimj7 While running on input video, I am getting this error. And it works fine with laptop webcam.
Kindly, look into this and let me know.
Thanks in advance.

(env_vamsi) C:\Users\BHEEMIREDDY VAMSI\Desktop\Main-Project>python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel --input videos/example_01.mp4
[INFO] Starting the video..
[ERROR:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\videoio\src\cap.cpp (162) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): in function 'cv::icvExtractPattern'

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Can you install the requirements as in requirements.txt?

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

version of opencv-python is 4.5.2.52

but while trying to install version of 4.2.0.32 it results in error! refer below picture

(env_vamsi) C:\Users\BHEEMIREDDY VAMSI\Desktop\Main-Project>pip install opencv-python==4.2.0.32
ERROR: Could not find a version that satisfies the requirement opencv-python==4.2.0.32 (from versions: 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.14.51, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.2.52)
ERROR: No matching distribution found for opencv-python==4.2.0.32

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Weird, I'm able to install it again, are you using anaconda? What is your python version?

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

Yes :( Initially I tried using cmd, but I got errors then I tried in Anaconda. Kindly help me na!

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

Yes, now I installed all requirements as per requirements file but I am got this error while running on video input.
P.S: Running using cmd
Python version 3.7.4

C:\Users\BHEEMIREDDY VAMSI\Desktop\Main-Project>python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel --input videos/example_01.mp4
[INFO] Starting the video..
[ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (116) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): in function 'cv::icvExtractPattern'

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Let's try to break it down, did you install ffmpeg (add its directory to the path environment variable) on windows? Also, did you build OpenCV from scratch?

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024
  1. I installed ffmpeg using this command pip install python-ffmpeg
  2. No, I did not build the OpenCV from scratch

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Download ffmpeg https://ffmpeg.org/download.html and add its directory to the path.

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

Done Installed ffmpeg and added to environmental variables.
P.S : Again same error.

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Can you install python and the requirements using anaconda? (make sure to use anaconda prompt instead of cmd) E.g., https://medium.com/@GalarnykMichael/install-python-anaconda-on-windows-2020-f8e188f9a63d

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

Yes, bro. Did that. Let me summarize what I did so far!

  1. Tried in cmd with python version 3.7.4, installed all requirements.
  2. Tried in anaconda with python version 3.7.4, installed all requirements.

PS : It is working fine for Webcam.

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Can you try this in anaconda? Create a new environment, do conda install pip and then: pip install dlib==19.22.0 imutils==0.5.4 numpy==1.20.3 opencv-python==4.5.2.52 schedule==0.6.0 scipy==1.6.3. Python version would be 3.9.5 by default. I am trying to check if you have the file opencv_videoio_ffmpeg452_64.dll in your anaconda environment path (by default something like C:\Users\xxx\Anaconda3\envs\test\Lib\site-packages\cv2).

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

Sir, I did everything. In last conversation you said building the opencv from scratch. How can I do that?

I tried above packages installation on both cmd and anaconda. Got the same error. Something with my OpenCv tobe specific while extracting the patterns. Kindly, go through the below error.

C:\Users\BHEEMIREDDY VAMSI\Desktop\Main-Project>python run.py --prototxt mobilenet_ssd/MobileNetSSD_deploy.prototxt --model mobilenet_ssd/MobileNetSSD_deploy.caffemodel --input videos/example_01.mp4
[INFO] Starting the video..
[ERROR:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\videoio\src\cap.cpp (162) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-m8us58q4\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): in function 'cv::icvExtractPattern'

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Did you create a new Conda environment and do you find the file opencv_videoio_ffmpeg452_64.dll?

from people-counting-in-real-time.

vamsireddy22 avatar vamsireddy22 commented on August 15, 2024

No, sir. I couldn't found any such file. How can do it.?

from people-counting-in-real-time.

saimj7 avatar saimj7 commented on August 15, 2024

Can I test this myself? Please email me.

from people-counting-in-real-time.

Related Issues (20)

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.