DegardinBruno / human-self-learning-anomaly

Code for the paper "Human Activity Analysis: Iterative Weak/Self-Supervised Learning Frameworks for Detecting Abnormal Events", IJCB 2020
Other
42 stars 13 forks source link

Preprocessing Dataset: Step2-Normalize Durations #5

Closed altuwairqi-s closed 2 years ago

altuwairqi-s commented 3 years ago

Hello

I'm in Preprocessing Dataset, I use UBI_FIGHTS dataset. When running the step2 normalize_videos.py file, it beginning processes the frames as well and then stopping the processes suddenly as the output is shown below:

(venv) sumaya@sumaya-virtual-machine:~/Downloads/human_self_learning_anomaly-master/utils$ python3 normalize_videos.py --root_frames /home/sumaya/Downloads/human_self_learning_anomaly-master/frames --root_sub_videos /home/sumaya/Downloads/human_self_learning_anomaly-master/frames --erase_frames Normalizing video duration... 1 Moviepy - Building video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_1_0_1_0_1/F_1_0_1_0_1_0.mp4. Moviepy - Writing video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_1_0_1_0_1/F_1_0_1_0_1_0.mp4

Moviepy - Done !
Moviepy - video ready /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_1_0_1_0_1/F_1_0_1_0_1_0.mp4 Successfully normalized! Normalizing video duration... 5 Moviepy - Building video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_0.mp4. Moviepy - Writing video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_0.mp4

Moviepy - Done !
Moviepy - video ready /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_0.mp4 Moviepy - Building video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_1.mp4. Moviepy - Writing video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_1.mp4

Moviepy - Done !
Moviepy - video ready /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_1.mp4 Moviepy - Building video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_2.mp4. Moviepy - Writing video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_2.mp4

Moviepy - Done !
Moviepy - video ready /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_2.mp4 Moviepy - Building video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_3.mp4. Moviepy - Writing video /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_3.mp4

Moviepy - Done !
Moviepy - video ready /home/sumaya/Downloads/human_self_learning_anomaly-master/frames/dataset/F_38_1_2_0_0/F_38_1_2_0_0_3.mp4 Killed

What is the problem?

DegardinBruno commented 3 years ago

Hello!

The time normalization already started and successfully normalized one of the videos (According to your output). Despite the short description of the problem, the output "Killed" is usually directly related to the python process. I will bet on memory issues. Could you specify your CPU and RAM so that I could reproduce the error?

altuwairqi-s commented 2 years ago

I work with Virtual Machine that has processors = 4 and Memory = 8 GB

DegardinBruno commented 2 years ago

Is the problem persisting? @altuwairqi-s

altuwairqi-s commented 2 years ago

Unfortunately, yes

DegardinBruno commented 2 years ago

Alright, I can recommend you some techniques that I use:

altuwairqi-s commented 2 years ago

Thank you for your advice, yes my OS is Linux and I tried all things that you mentioned, and unfortunately didn't work even when increased the RAM to 10GB (This is the max limit to increase).

I found a script that handles this issue. This script alleviates the issue but it still exists, where the problem appears at the beginning of the second video before using the script. And after using it, the problem appears at the end of the second video.

In this experience, I only used four videos where the longest length does not exceed 2 mins. and the script will find in this link: https://serverfault.com/questions/363951/run-a-python-script-that-is-never-killed

altuwairqi-s commented 2 years ago

The problem is solved by using another device with more capabilities. Thank you @DegardinBruno.