Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing returns #13

Open
xuyao91 opened this issue Oct 17, 2022 · 9 comments
Open

Nothing returns #13

xuyao91 opened this issue Oct 17, 2022 · 9 comments

Comments

@xuyao91
Copy link

xuyao91 commented Oct 17, 2022

Hi
I ran the program and got no error, but nothing returns,
this is logs

python fall_detector.py --video=/Users/xuyao/Workspaces/ai/HumanFallDetection/video/1665573678425490.mp4

Starting...
src/openpifpaf/csrc/src/cif_hr.cpp:102: UserInfo: resizing cifhr buffer
src/openpifpaf/csrc/src/occupancy.cpp:53: UserInfo: resizing occupancy buffer
Exiting...

@xinrui98
Copy link

xinrui98 commented Oct 23, 2022

I have the exact same issue. When I save the output and open it, the .avi output does not play.

@taufeeque9
Copy link
Owner

The expected output is that the video should play as shown in the readme. Can you specify the Python version you are using? I have tested the library with Python3.9. You can try running the program in a virtual env with Python3.9 installed along with the requirements.

If this doesn't fix the issue, the problem may be with reading the exact input video. Does the problem persist with any type of video? If not, then you can link the video here, and I can try to run it from my end to debug the issue further. Another thing you can try is to run the program directly with a webcam as: python fall_detector.py and see if that works.

@xinrui98
Copy link

xinrui98 commented Oct 23, 2022

I have tried using python3.9 and have recorded a screen recording to demonstrate my issue. The video file is in a normal mp4 format. When I run, fall_detector.py, I see the video popping out for just a split second and it closes, then the logs print exiting... Same issue for using Webcam. Thanks in advance for your help! https://drive.google.com/file/d/1ITSKGFJr1xDXxlxfWh8SMP3F7Mxp_q5w/view?usp=sharing

@taufeeque9
Copy link
Owner

I have fixed the error you are getting with the webcam. Let me know if you are able to run the program with a webcam now.

As for the issue with using the video input, I don't see why it is not showing the output. I think the code is running fine, just that OpenCV is not able to start/display the video output. If you're this on a server, then you should first try running the program locally.

@xinrui98
Copy link

I am running the program locally. Still same issue with Webcam and Video, where it pops up for 1s and exits right after. One thing to note is that I have disabled cuda and am using a Macbook with Intel Chip. Could that be the cause of the problem?

@taufeeque9
Copy link
Owner

I haven't tested it on macOS, so that could be an issue. It could also be an IDE-related issue. Can you directly run the program without the IDE?

Specifically, it seems like PyCharm may cause some trouble with OpenCV: https://stackoverflow.com/questions/64950340/cv2-imshow-is-not-working-properly-in-pycharm-macos

@xinrui98
Copy link

xinrui98 commented Oct 23, 2022

I am running the program directly on the terminal, where the issue still persists as seen in the video. The only code I changed was changing disable_cuda to default True. Do you think that could have caused the issue? Also, what IDE are you using? Perhaps I can try to use that IDE instead. https://drive.google.com/file/d/14XTsND12-luSU19OtAc5Abmyd-yYZiq7/view?usp=sharing

@taufeeque9
Copy link
Owner

I don't think disabling CUDA is the cause of the issue.

I am also running the program directly through the terminal, although on Ubuntu 18.04.

I would recommend using a debugger to dive deeper into the issue. You can add some breakpoints at various places in the code where the while loop of processing the input could potentially terminate. For example, on lines 268 and 272 of algorithms.py.

@xinrui98
Copy link

I have tried to put some breakpoints at various places. However, since my video do appear (although just for a split second), there isn't any exceptions being thrown. Have you tested the code on Windows as well? Or does it only work on Ubuntu 18.04?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants