Open jaewoong1 opened 5 years ago
[Line 58 in Deploy.py]: This line convert the image in BGR (if we read the webcam by OpenCV) to the net input. If our OpenCV does not use GPU to do that, it might be kind of slow.
[Line 79 in src/ViolenceDetector.py]: This line use numpy to stack two images to form one net input. If we find this is the bottleneck maybe we can train a model with single frame image as its input to inference the result. At first, set GROUPED_SIZE=1 in DataSettings.py, then specify to use the G1D19_1Fc_1LSTM model by editing the NetSettings.py.
[Line 90 in src/ViolenceDetector.py]: This line send the two frames into the network and should be only the process that take most of the time. If this is the case, we can use more powerful graphic cards or, design our own model that is suitable for our device. We can refer to src/net/*.py to see examples to design our own model
Hi @harshavkumar. I wanted to know if you were able to detect violence in videos at real-time or not? Using the above the steps? Regards.
sorry for such a late reply, yes I am able to do so!! using the above steps
I figured it out as well. Thanks for your response, though.
i don't know how can i test in webcam...
please give me a code of webcam testing