2gauravc / w_yrs_poc1

0 stars 0 forks source link

Critical Pose point data point NULL even after imputation #5

Closed 2gauravc closed 3 years ago

2gauravc commented 3 years ago

Reference Video: ../inputs_outputs/videos/vjump-s1b.mov Log File Attached

CRITICAL FRAMES IDENTIFIED: Squat posture: frame 12 Jump Peak posture: frame 16 Landing posture: frame 36

Critical frames identified above have missing body points. Frames around these critical frames also have missing body points. So, these missing body points will now be imputed.

Analysing video according to vertical jump criteria... OpenCV: FFMPEG: tag 0x5634504d/'MP4V' is not supported with codec id 12 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v' Error while analysing video.

Program will exit in 10 seconds.

2gauravc commented 3 years ago

vjump_log.txt

2gauravc commented 3 years ago

Analysing Issue:

"Elbow Angles 1. None, 2. None, 3. None"

Hence the function call

elbow_angle = self.calculate_angle_between_three_points returns the error.

03-Oct-20 07:19:53 - DEBUG - Analysing video - frame 12 of 52 - SQUAT posture frame. 03-Oct-20 07:19:53 - DEBUG - - Calculating body angles. 03-Oct-20 07:19:53 - ERROR - EXCEPTION OCCURED - Unable to analyse video. Program will be TERMINATED. Traceback (most recent call last): File "main_program.py", line 139, in run_vjump_analysis my_video.analyse_vjump_video() File "/home/ubuntu/w_yrs_poc1/code/VJump/VJump.py", line 936, in analyse_vjump_video skeleton_frame, squat_frame_text, report_text = self.jump_quality_at_squat_frame(frame, frame_counter, self.df_vid_points.loc[frame_counter], self.df_vid_points_imputed.loc[frame_counter]) File "/home/ubuntu/w_yrs_poc1/code/VJump/VJump.py", line 377, in jump_quality_at_squat_frame points_row_imputed[elbow_angle_points[2]] File "/home/ubuntu/w_yrs_poc1/code/VJump/VJump.py", line 336, in calculate_angle_between_three_points x_1, y_1 = point_1 TypeError: 'NoneType' object is not iterable:q

03-Oct-20 07:20:03 - DEBUG - ----- MAIN PROGRAM FINISHED -----

2gauravc commented 3 years ago
prerak12agarwal commented 3 years ago

This issue should be flagged properly now in the program. Added a check after imputation to verify whether the critical frames still contain any null values or not. If yes, program shows an error and exits. If not, program continues as per normal.