JoshuaPiinRueyPan / ViolenceDetection

Apache License 2.0
152 stars 39 forks source link

Regarding the video length and resolution #12

Open ChunfeiMa opened 5 years ago

ChunfeiMa commented 5 years ago

Thanks for your work at first. My problem is that I've tried the code with my own datasets in which the video clips' length(10s~60s) and resolution(1280x720) are much bigger than the public DB, such like HockeyFightsDB/ViolenceFlow DB, but it seems the training does not work(training just does not continue/just pending in somewhere somehow). I guess that may due to the video loading problem but cannot figure out what exactly it is yet, so I was wondering if it is necessary to cut the video clips into shorter(<3s) and smaller(QVGA) ones in order to feed them into the code without any problem? PS: I also tried to adjust the parameters like BATCH_SIZE/UNROLLED_SIZE/WAITING_QUEUE_MAX_SIZE/LOADED_QUEUE_MAX_SIZE/NUMBER_OF_LOAD_DATA_THREADS, but the problem still stayed there. Any suggestion?

JoshuaPiinRueyPan commented 5 years ago

Hi, You are right. I think it's due to the length of the video. As you pointed out, you probabily need to cut the video clips...

PS. I think you may want to know the following tips if you want to create your own dataset: This project support cases that: (1) The violence event happend in the middle of the video (or, the violence event does not happend from the begin of the video). (2) The violence event end before the end of the video.

You can specified the Start Frame and the End Frame of the Violence event of the video in the data catelog (such as the train.txt after you execute the _tools/Train_Val_Testspliter.py). In the data catelog, you can find the format shown as follows: data/video.avi <tab> 0.0 <tab> INF The first element is the path to each video. The second element is the frame index that the Violence event starts. The third element is the frame index that the Violence event ends. For the hocky dataset, the violence start from the begin till the end of the video. Thus the second and third element will be '0' and 'INF', respectively.

ChunfeiMa commented 5 years ago

Yes, thanks for your tips. Hope your work doing well.

On Thu, Jan 24, 2019, 6:55 PM JoshuaPiinRueyPan <notifications@github.com wrote:

Hi, You are right. I think it's due to the length of the video. As you pointed out, you probabily need to cut the video clips...

PS. I think you may want to know the following tips if you want to create your own dataset: This project support cases that: (1) The violence event happend in the middle of the video (or, the violence event does not happend from the begin of the video). (2) The violence event end before the end of the video.

You can specified the Start Frame and the End Frame of the Violence event of the video in the data catelog (such as the train.txt after you execute the tools/Train_Val_Test_spliter.py). In the data catelog, you can find the format shown as follows: data/video.avi 0.0 INF The first element is the path to each video. The second element is the frame index that the Violence event starts. The third element is the frame index that the Violence event ends. For the hocky dataset, the violence start from the begin till the end of the video. Thus the second and third element will be '0' and 'INF', respectively.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JoshuaPiinRueyPan/ViolenceDetection/issues/12#issuecomment-457136465, or mute the thread https://github.com/notifications/unsubscribe-auth/AbZF7iOTnDnVdSBmUrw3r2_WCfiv_KuVks5vGYMlgaJpZM4aOCwQ .