Open gupork opened 4 years ago
@gupork Hi, Thank you for your interest in this project.
I think that there is a problem on the server side. darkent_client looks like fine.
:o: : Good, :x: : Fail Client --:o:--> Ventilator --:x:--> Worker --:x:--> Sink --:x:--> Client
First, please abort all process (Ventilator, Sink, Worker and Client) and retry it.
./sink
./ventilator
./worker <CFG_PATH> <WEIGHTS_PATH> <NAMES_PATH> [-pose] [-gpu GPU_ID] [-thresh THRESH]
./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid
It should be like :
Ventilator | Recv From Client | SEQ : 0 | LEN : 12345
Ventilator | Send To Worker | SEQ : 0 | LEN : 12345
...
Worker | Recv From Ventilator | SEQ : 0 | LEN : 12345
Darknet | Detect | SEQ : 0 | Time : 50ms
Worker | Send To Sink | SEQ : 0 | LEN : 13456
...
Sink | Recv From Worker | SEQ : 0 | LEN : 13456
Sink | Pub To Client | SEQ : 0 | LEN : 13456
and then please let me know the result.
Just have a quick try: for the worker process, should I run two separate process: ./worker fight.cfg fight.weights coco.names -gpu 0 -thresh 0.2 ./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2 Like the above?
If so, there should be 4 terminals running before the client process: ./sink ./ventilator ./worker fight.cfg fight.weights coco.names -gpu 0 -thresh 0.2 ./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2
Right?
if you want to two worker, use same command.
./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2
./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2
It should be like : ./sink ./ventilator ./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2 ./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2
So one worker is enough to make the whole pipeline work? Because I see the below instruction from the Readme seem two workers are required.
(Thanks again for your guidance. If I manage to run it would like to raise a cooperation project if you are interested!)
This time I have run: ./sink ./ventilator ./worker openpose.cfg openpose.weight -gpu 0 -pose -thresh 0.2 ./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid
When it's running, both input / output window frozen:
The client manage to run but it won't stop and loop: R : 339 | C : 339 | F : 0 | T : 340 : 1 R : 339 | C : 339 | F : 0 | T : 340 : 1 R : 339 | C : 339 | F : 0 | T : 340 : 1 R : 339 | C : 339 | F : 0 | T : 340 : 1
When I check on the output video, its size: and fail to open it.
So one worker is enough to make the whole pipeline work?
Right :+1:
If I manage to run it would like to raise a cooperation project if you are interested!
Thanks. always welcome :+1:
The client manage to run but it won't stop and loop:
Sorry, this client is unstable.
please abort sink and re-run sink.
change -out_vid
to -out_json
and check that json is fine.
./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_json
-out_json
to -out_vid
and retry it. (You have to re-run sink)./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid
if all data are received, try using CTRL-Z CTRL-C key to stop client program.
(check client stdout R : 339 | C : 339 | F : 0 | T : 340 : 1
R and C must same.)
Thanks for the tips! Finally the output window move for few seconds but stop still (the input window can run the whole video now)
The json can capture everything now.
However, when I get to out_vid, it comes out with this error:
I'm using a GPU Tesla T4 16GB on a local machine FYI.
I think that we have a OpenCV problem.
please check that if using below command (not include -out_vid, -out_json
), the input and output windows can play the whole video? (Please re-run all processes)
./darknet_client -addr 127.0.0.1 -vid test_short.mp4
and please let me know which version of openCV do you use.
Add : try this command.
./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid -dont_show
I think that we have a OpenCV problem.
please check that if using below command (not include
-out_vid, -out_json
), the input and output windows can play the whole video? (Please re-run all processes)./darknet_client -addr 127.0.0.1 -vid test_short.mp4
and please let me know which version of openCV do you use.
Add : try this command.
./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid -dont_show
Taking out both output, the input window can play the whole video and the output window cannot.
Using dont_show, the output video file seem with normal size: However, it cannot be played via VLC player with error:
OpenCV version should be 4.2.0 by command:
However, given that I have tried multiple installation before, it appears to have 3.4.9 as well by following command:
Sorry, I can't find what is the problem. I should test on my machine. I think it will take time to figure out what is the problem. Let me know if there's any progress.
Sorry, I can't find what is the problem. I should test on my machine. I think it will take time to figure out what is the problem. Let me know if there's any progress.
Thanks and understand. Do you have a recommended OpenCV version (other library as well)? If so I will try to set up the environment according to the library version you have.
I have uploaded the sample video here FYI: https://drive.google.com/file/d/19BHrzgebKcAHFHgw-2AukYmeTZM7XjWf/view?usp=sharing
Please let me know if you manage to run it. I shall send you an email to discuss in details for my project.
@gupork Hi,
I found this issue.
Some UI backends may support "more or less" multi-thread interaction. But in general, multi-threading is not supported well by UI.
I think that win32 UI Backends support multi-thread but GTK may not.
So I moved GUI code(input_show_thread
, output_show_thread
) into main thread.
It worked on my machine (Machine 1 : Ubuntu 14.04, OpenCV 3.4.0, Machine 2 : Windows 7, OpenCV 4.1.1)
Please try this and let me know about the result. I hope it works out.
@gupork Hi,
I found this issue.
Some UI backends may support "more or less" multi-thread interaction. But in general, multi-threading is not supported well by UI.
I think that win32 UI Backends support multi-thread but GTK may not.
So I moved GUI code(
input_show_thread
,output_show_thread
) into main thread. It worked on my machine (Machine 1 : Ubuntu 14.04, OpenCV 3.4.0, Machine 2 : Windows 7, OpenCV 4.1.1)Please try this and let me know about the result. I hope it works out.
Changed code (client/Main.cpp)
Hi imsoo!
I have no luck to run the "fight" detection unfortunately but I'm quite confident in your solution. Do you want to develop it further and apply on some real cases? If so, I would like to discuss with you in details via email or any convenient way.
@gupork,
Sorry for my late reply. I sent it by email.
the same problem to me .
does it need stronger gpu ? i have used single gpu 1050 and 1060 .the trouble is same to you ! Communication is normal ,The Input / Output window is frozen on the first frame. The client can run but no action detected in the json file and the generated test_short_output.mp4 crash.
last when se -dont_show it can generate outvideo. and when use small person video openpose and fight detection are not good
Hi imsoo,
Thanks for the great sharing on this project. I have tried to build the project according to the instruction and the client can be run. However, once I start the following command: ./darknet_client -addr 127.0.0.1 -vid test_short.mp4 -out_vid.
Error message appear: OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
The Input / Output window frozen on the first frame. The client can run but no action detected in the json file and the generated test_short_output.mp4 crash.
The client keep running without stop, when we stop it the error message is: (INPUT:13633): GLib-CRITICAL **: 13:53:56.806: Source ID 158 was not found when attempting to remove it
The following image is captured from several terminals of the deployed machine:
Please kindly provide some comments on how I begin the troubleshoot.