diff --git a/data/Fall_Simulation_Data/annotations_test.csv b/data/Fall_Simulation_Data/annotations_test.csv new file mode 100644 index 0000000..7ad633f --- /dev/null +++ b/data/Fall_Simulation_Data/annotations_test.csv @@ -0,0 +1,73 @@ +video_path,video_name,category,camera_id,scenario_id,fall_start,fall_end,lying_start,lying_end,length,fall_visible,lying_visible,ranking +data/Fall_Simulation_Data/videos/Fall3_Cam2.avi,Fall3_Cam2,Fall,2,3,128.0,131.0,131.0,224.0,235,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall13_Cam3.avi,Fall13_Cam3,Fall,3,13,24.0,27.0,27.0,94.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall1_Cam1.avi,Fall1_Cam1,Fall,1,1,47.0,50.0,50.0,125.0,138,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall45_Cam2.avi,Fall45_Cam2,Fall,2,45,20.0,22.0,22.0,28.0,50,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL10_Cam3.avi,ADL10_Cam3,ADL,3,10,,,,,1170,,, +data/Fall_Simulation_Data/videos/ADL13_Cam4.avi,ADL13_Cam4,ADL,4,13,,,,,860,,, +data/Fall_Simulation_Data/videos/Fall22_Cam5.avi,Fall22_Cam5,Fall,5,22,19.0,22.0,22.0,127.0,145,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall29_Cam4.avi,Fall29_Cam4,Fall,4,29,23.0,25.0,25.0,37.0,120,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall27_Cam4.avi,Fall27_Cam4,Fall,4,27,67.0,70.0,70.0,121.0,140,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall28_Cam2.avi,Fall28_Cam2,Fall,2,28,68.0,70.0,70.0,134.0,150,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall10_Cam5.avi,Fall10_Cam5,Fall,5,10,23.0,25.0,25.0,168.0,180,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall31_Cam1.avi,Fall31_Cam1,Fall,1,31,65.0,67.0,67.0,158.0,180,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall1_Cam5.avi,Fall1_Cam5,Fall,5,1,47.0,50.0,50.0,125.0,138,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall46_Cam5.avi,Fall46_Cam5,Fall,5,46,26.0,28.0,28.0,39.0,60,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall30_Cam1.avi,Fall30_Cam1,Fall,1,30,24.0,27.0,27.0,88.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL1_Cam2.avi,ADL1_Cam2,ADL,2,1,,,,,1800,,, +data/Fall_Simulation_Data/videos/Fall49_Cam2.avi,Fall49_Cam2,Fall,2,49,24.0,26.0,26.0,123.0,145,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL13_Cam3.avi,ADL13_Cam3,ADL,3,13,,,,,860,,, +data/Fall_Simulation_Data/videos/Fall35_Cam4.avi,Fall35_Cam4,Fall,4,35,29.0,32.0,32.0,230.0,245,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL15_Cam4.avi,ADL15_Cam4,ADL,4,15,,,,,1165,,, +data/Fall_Simulation_Data/videos/ADL12_Cam3.avi,ADL12_Cam3,ADL,3,12,,,,,1420,,, +data/Fall_Simulation_Data/videos/Fall15_Cam5.avi,Fall15_Cam5,Fall,5,15,10.0,12.0,12.0,103.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall35_Cam2.avi,Fall35_Cam2,Fall,2,35,29.0,32.0,32.0,230.0,245,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall51_Cam4.avi,Fall51_Cam4,Fall,4,51,28.0,31.0,31.0,140.0,150,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall6_Cam4.avi,Fall6_Cam4,Fall,4,6,44.0,47.0,47.0,238.0,255,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall27_Cam3.avi,Fall27_Cam3,Fall,3,27,67.0,70.0,70.0,121.0,140,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL3_Cam4.avi,ADL3_Cam4,ADL,4,3,,,,,740,,, +data/Fall_Simulation_Data/videos/Fall33_Cam5.avi,Fall33_Cam5,Fall,5,33,28.0,30.0,30.0,200.0,225,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall41_Cam3.avi,Fall41_Cam3,Fall,3,41,39.0,42.0,42.0,95.0,140,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall43_Cam5.avi,Fall43_Cam5,Fall,5,43,64.0,66.0,66.0,106.0,145,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall3_Cam3.avi,Fall3_Cam3,Fall,3,3,128.0,131.0,131.0,224.0,235,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall26_Cam1.avi,Fall26_Cam1,Fall,1,26,15.0,18.0,18.0,106.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall30_Cam4.avi,Fall30_Cam4,Fall,4,30,24.0,27.0,27.0,88.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL10_Cam2.avi,ADL10_Cam2,ADL,2,10,,,,,1170,,, +data/Fall_Simulation_Data/videos/Fall50_Cam5.avi,Fall50_Cam5,Fall,5,50,15.0,18.0,18.0,131.0,140,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall37_Cam2.avi,Fall37_Cam2,Fall,2,37,30.0,33.0,33.0,88.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL15_Cam5.avi,ADL15_Cam5,ADL,5,15,,,,,1165,,, +data/Fall_Simulation_Data/videos/Fall28_Cam4.avi,Fall28_Cam4,Fall,4,28,68.0,70.0,70.0,134.0,150,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall26_Cam4.avi,Fall26_Cam4,Fall,4,26,15.0,18.0,18.0,106.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL12_Cam5.avi,ADL12_Cam5,ADL,5,12,,,,,1420,,, +data/Fall_Simulation_Data/videos/ADL3_Cam5.avi,ADL3_Cam5,ADL,5,3,,,,,740,,, +data/Fall_Simulation_Data/videos/Fall46_Cam4.avi,Fall46_Cam4,Fall,4,46,26.0,28.0,28.0,39.0,60,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall52_Cam2.avi,Fall52_Cam2,Fall,2,52,43.0,45.0,45.0,164.0,180,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall14_Cam1.avi,Fall14_Cam1,Fall,1,14,11.0,13.0,13.0,220.0,255,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall24_Cam2.avi,Fall24_Cam2,Fall,2,24,30.0,33.0,33.0,97.0,130,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall10_cam4.avi,Fall10_cam4,Fall,4,10,23.0,25.0,25.0,168.0,180,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall5_Cam3.avi,Fall5_Cam3,Fall,3,5,32.0,34.0,34.0,216.0,235,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL7_Cam5.avi,ADL7_Cam5,ADL,5,7,,,,,1528,,, +data/Fall_Simulation_Data/videos/ADL12_Cam4.avi,ADL12_Cam4,ADL,4,12,,,,,1420,,, +data/Fall_Simulation_Data/videos/Fall33_Cam3.avi,Fall33_Cam3,Fall,3,33,28.0,30.0,30.0,200.0,225,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall35_Cam3.avi,Fall35_Cam3,Fall,3,35,29.0,32.0,32.0,230.0,245,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall14_Cam2.avi,Fall14_Cam2,Fall,2,14,11.0,13.0,13.0,220.0,255,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL14_Cam2.avi,ADL14_Cam2,ADL,2,14,,,,,1450,,, +data/Fall_Simulation_Data/videos/Fall23_Cam5.avi,Fall23_Cam5,Fall,5,23,16.0,19.0,19.0,110.0,126,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall12_Cam1.avi,Fall12_Cam1,Fall,1,12,16.0,18.0,18.0,71.0,72,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall33_Cam2.avi,Fall33_Cam2,Fall,2,33,28.0,30.0,30.0,200.0,225,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall39_Cam2.avi,Fall39_Cam2,Fall,2,39,30.0,32.0,32.0,86.0,110,True,False,5.0 +data/Fall_Simulation_Data/videos/Fall44_Cam4.avi,Fall44_Cam4,Fall,4,44,26.0,28.0,28.0,31.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall27_Cam2.avi,Fall27_Cam2,Fall,2,27,67.0,70.0,70.0,121.0,140,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall4_Cam5.avi,Fall4_Cam5,Fall,5,4,95.0,96.0,96.0,195.0,235,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall30_Cam3.avi,Fall30_Cam3,Fall,3,30,24.0,27.0,27.0,88.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall46_Cam2.avi,Fall46_Cam2,Fall,2,46,26.0,28.0,28.0,39.0,60,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall42_Cam4.avi,Fall42_Cam4,Fall,4,42,79.0,81.0,81.0,92.0,140,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall29_Cam2.avi,Fall29_Cam2,Fall,2,29,23.0,25.0,25.0,37.0,120,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall7_Cam5.avi,Fall7_Cam5,Fall,5,7,28.0,31.0,31.0,219.0,230,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall6_Cam5.avi,Fall6_Cam5,Fall,5,6,44.0,47.0,47.0,238.0,255,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL9_Cam5.avi,ADL9_Cam5,ADL,5,9,,,,,1140,,, +data/Fall_Simulation_Data/videos/ADL5_Cam2.avi,ADL5_Cam2,ADL,2,5,,,,,698,,, +data/Fall_Simulation_Data/videos/Fall47_Cam4.avi,Fall47_Cam4,Fall,4,47,25.0,28.0,28.0,39.0,55,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall38_Cam4.avi,Fall38_Cam4,Fall,4,38,24.0,26.0,26.0,78.0,90,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL16_Cam1.avi,ADL16_Cam1,ADL,1,16,,,,,840,,, +data/Fall_Simulation_Data/videos/Fall48_Cam3.avi,Fall48_Cam3,Fall,3,48,32.0,34.0,34.0,47.0,70,True,True,2.0 diff --git a/data/Fall_Simulation_Data/annotations_train.csv b/data/Fall_Simulation_Data/annotations_train.csv new file mode 100644 index 0000000..a4ca83c --- /dev/null +++ b/data/Fall_Simulation_Data/annotations_train.csv @@ -0,0 +1,250 @@ +video_path,video_name,category,camera_id,scenario_id,fall_start,fall_end,lying_start,lying_end,length,fall_visible,lying_visible,ranking +data/Fall_Simulation_Data/videos/Fall7_Cam4.avi,Fall7_Cam4,Fall,4,7,28.0,31.0,31.0,219.0,230,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall23_Cam3.avi,Fall23_Cam3,Fall,3,23,16.0,19.0,19.0,110.0,126,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall7_Cam2.avi,Fall7_Cam2,Fall,2,7,28.0,31.0,31.0,219.0,230,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall50_Cam4.avi,Fall50_Cam4,Fall,4,50,15.0,18.0,18.0,131.0,140,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall34_Cam4.avi,Fall34_Cam4,Fall,4,34,25.0,28.0,28.0,241.0,265,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall23_Cam1.avi,Fall23_Cam1,Fall,1,23,16.0,19.0,19.0,110.0,126,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall12_Cam2.avi,Fall12_Cam2,Fall,2,12,16.0,18.0,18.0,71.0,72,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall50_Cam1.avi,Fall50_Cam1,Fall,1,50,15.0,18.0,18.0,131.0,140,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL17_Cam5.avi,ADL17_Cam5,ADL,5,17,,,,,1875,,, +data/Fall_Simulation_Data/videos/Fall48_Cam1.avi,Fall48_Cam1,Fall,1,48,32.0,34.0,34.0,47.0,70,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL5_Cam3.avi,ADL5_Cam3,ADL,3,5,,,,,698,,, +data/Fall_Simulation_Data/videos/Fall19_Cam5.avi,Fall19_Cam5,Fall,5,19,55.0,58.0,58.0,225.0,240,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall39_Cam5.avi,Fall39_Cam5,Fall,5,39,30.0,32.0,32.0,86.0,110,True,False,3.0 +data/Fall_Simulation_Data/videos/Fall7_Cam1.avi,Fall7_Cam1,Fall,1,7,28.0,31.0,31.0,219.0,230,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall19_Cam1.avi,Fall19_Cam1,Fall,1,19,55.0,58.0,58.0,225.0,240,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall9_Cam3.avi,Fall9_Cam3,Fall,3,9,78.0,80.0,80.0,203.0,224,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall10_Cam1.avi,Fall10_Cam1,Fall,1,10,23.0,25.0,25.0,168.0,180,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall36_Cam2.avi,Fall36_Cam2,Fall,2,36,32.0,34.0,34.0,175.0,245,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall37_Cam5.avi,Fall37_Cam5,Fall,5,37,30.0,33.0,33.0,88.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall18_Cam3.avi,Fall18_Cam3,Fall,3,18,88.0,91.0,91.0,243.0,255,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall11_cam4.avi,Fall11_cam4,Fall,4,11,52.0,54.0,54.0,60.0,145,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall26_Cam5.avi,Fall26_Cam5,Fall,5,26,15.0,18.0,18.0,106.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall53_Cam3.avi,Fall53_Cam3,Fall,3,53,71.0,73.0,73.0,214.0,220,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall42_Cam1.avi,Fall42_Cam1,Fall,1,42,79.0,81.0,81.0,92.0,140,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall39_Cam4.avi,Fall39_Cam4,Fall,4,39,30.0,32.0,32.0,86.0,110,False,False,4.0 +data/Fall_Simulation_Data/videos/ADL12_Cam1.avi,ADL12_Cam1,ADL,1,12,,,,,1420,,, +data/Fall_Simulation_Data/videos/Fall47_Cam1.avi,Fall47_Cam1,Fall,1,47,25.0,28.0,28.0,39.0,55,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL3_Cam1.avi,ADL3_Cam1,ADL,1,3,,,,,740,,, +data/Fall_Simulation_Data/videos/Fall41_Cam4.avi,Fall41_Cam4,Fall,4,41,39.0,42.0,42.0,95.0,140,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL7_Cam3.avi,ADL7_Cam3,ADL,3,7,,,,,1528,,, +data/Fall_Simulation_Data/videos/ADL5_Cam4.avi,ADL5_Cam4,ADL,4,5,,,,,698,,, +data/Fall_Simulation_Data/videos/Fall16_Cam2.avi,Fall16_Cam2,Fall,2,16,12.0,15.0,15.0,177.0,190,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL16_Cam4.avi,ADL16_Cam4,ADL,4,16,,,,,840,,, +data/Fall_Simulation_Data/videos/Fall15_Cam3.avi,Fall15_Cam3,Fall,3,15,10.0,12.0,12.0,103.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall54_Cam4.avi,Fall54_Cam4,Fall,4,54,43.0,46.0,46.0,184.0,205,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall35_Cam5.avi,Fall35_Cam5,Fall,5,35,29.0,32.0,32.0,230.0,245,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall11_Cam2.avi,Fall11_Cam2,Fall,2,11,52.0,54.0,54.0,60.0,145,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall2_Cam2.avi,Fall2_Cam2,Fall,2,2,97.0,100.0,100.0,248.0,270,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL15_Cam2.avi,ADL15_Cam2,ADL,2,15,,,,,1165,,, +data/Fall_Simulation_Data/videos/Fall18_Cam5.avi,Fall18_Cam5,Fall,5,18,88.0,91.0,91.0,243.0,255,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall22_Cam1.avi,Fall22_Cam1,Fall,1,22,19.0,22.0,22.0,127.0,145,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall21_Cam4.avi,Fall21_Cam4,Fall,4,21,49.0,51.0,51.0,160.0,160,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall42_Cam2.avi,Fall42_Cam2,Fall,2,42,79.0,81.0,81.0,92.0,140,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall28_Cam3.avi,Fall28_Cam3,Fall,3,28,68.0,70.0,70.0,134.0,150,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL8_Cam2.avi,ADL8_Cam2,ADL,2,8,,,,,880,,, +data/Fall_Simulation_Data/videos/ADL13_Cam2.avi,ADL13_Cam2,ADL,2,13,,,,,860,,, +data/Fall_Simulation_Data/videos/ADL9_Cam2.avi,ADL9_Cam2,ADL,2,9,,,,,1140,,, +data/Fall_Simulation_Data/videos/Fall35_Cam1.avi,Fall35_Cam1,Fall,1,35,29.0,32.0,32.0,230.0,245,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL4_Cam3.avi,ADL4_Cam3,ADL,3,4,,,,,828,,, +data/Fall_Simulation_Data/videos/Fall24_Cam4.avi,Fall24_Cam4,Fall,4,24,30.0,33.0,33.0,97.0,130,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL4_Cam5.avi,ADL4_Cam5,ADL,5,4,,,,,828,,, +data/Fall_Simulation_Data/videos/ADL14_Cam5.avi,ADL14_Cam5,ADL,5,14,,,,,1450,,, +data/Fall_Simulation_Data/videos/Fall24_Cam3.avi,Fall24_Cam3,Fall,3,24,30.0,33.0,33.0,97.0,130,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall29_Cam5.avi,Fall29_Cam5,Fall,5,29,23.0,25.0,25.0,37.0,120,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall21_Cam5.avi,Fall21_Cam5,Fall,5,21,49.0,51.0,51.0,160.0,160,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall55_Cam4.avi,Fall55_Cam4,Fall,4,55,29.0,32.0,32.0,164.0,180,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall55_Cam3.avi,Fall55_Cam3,Fall,3,55,29.0,32.0,32.0,164.0,180,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall17_Cam4.avi,Fall17_Cam4,Fall,4,17,14.0,16.0,16.0,112.0,124,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL5_Cam1.avi,ADL5_Cam1,ADL,1,5,,,,,698,,, +data/Fall_Simulation_Data/videos/Fall41_Cam2.avi,Fall41_Cam2,Fall,2,41,39.0,42.0,42.0,95.0,140,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall8_Cam2.avi,Fall8_Cam2,Fall,2,8,79.0,82.0,82.0,188.0,200,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall54_Cam5.avi,Fall54_Cam5,Fall,5,54,43.0,46.0,46.0,184.0,205,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall18_Cam2.avi,Fall18_Cam2,Fall,2,18,88.0,91.0,91.0,243.0,255,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL3_Cam2.avi,ADL3_Cam2,ADL,2,3,,,,,740,,, +data/Fall_Simulation_Data/videos/ADL10_Cam1.avi,ADL10_Cam1,ADL,1,10,,,,,1170,,, +data/Fall_Simulation_Data/videos/Fall23_Cam2.avi,Fall23_Cam2,Fall,2,23,16.0,19.0,19.0,110.0,126,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall34_Cam2.avi,Fall34_Cam2,Fall,2,34,25.0,28.0,28.0,241.0,265,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall5_Cam4.avi,Fall5_Cam4,Fall,4,5,32.0,34.0,34.0,216.0,235,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall32_Cam5.avi,Fall32_Cam5,Fall,5,32,53.0,55.0,55.0,144.0,174,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL6_Cam5.avi,ADL6_Cam5,ADL,5,6,,,,,1490,,, +data/Fall_Simulation_Data/videos/Fall6_Cam1.avi,Fall6_Cam1,Fall,1,6,44.0,47.0,47.0,238.0,255,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall16_Cam1.avi,Fall16_Cam1,Fall,1,16,12.0,15.0,15.0,177.0,190,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall2_Cam4.avi,Fall2_Cam4,Fall,4,2,97.0,100.0,100.0,248.0,270,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall39_Cam3.avi,Fall39_Cam3,Fall,3,39,30.0,32.0,32.0,86.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall24_Cam1.avi,Fall24_Cam1,Fall,1,24,30.0,33.0,33.0,97.0,130,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall25_Cam1.avi,Fall25_Cam1,Fall,1,25,23.0,25.0,25.0,96.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall31_Cam2.avi,Fall31_Cam2,Fall,2,31,65.0,67.0,67.0,158.0,180,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall42_Cam5.avi,Fall42_Cam5,Fall,5,42,79.0,81.0,81.0,92.0,140,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall51_Cam2.avi,Fall51_Cam2,Fall,2,51,28.0,31.0,31.0,140.0,150,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall3_Cam1.avi,Fall3_Cam1,Fall,1,3,128.0,131.0,131.0,224.0,235,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL16_Cam3.avi,ADL16_Cam3,ADL,3,16,,,,,840,,, +data/Fall_Simulation_Data/videos/Fall22_Cam4.avi,Fall22_Cam4,Fall,4,22,19.0,22.0,22.0,127.0,145,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall4_Cam4.avi,Fall4_Cam4,Fall,4,4,95.0,96.0,96.0,195.0,235,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall45_Cam1.avi,Fall45_Cam1,Fall,1,45,20.0,22.0,22.0,28.0,50,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall4_Cam2.avi,Fall4_Cam2,Fall,2,4,95.0,96.0,96.0,195.0,235,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall15_Cam4.avi,Fall15_Cam4,Fall,4,15,10.0,12.0,12.0,103.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL17_Cam3.avi,ADL17_Cam3,ADL,3,17,,,,,1875,,, +data/Fall_Simulation_Data/videos/Fall51_Cam5.avi,Fall51_Cam5,Fall,5,51,28.0,31.0,31.0,140.0,150,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall51_Cam3.avi,Fall51_Cam3,Fall,3,51,28.0,31.0,31.0,140.0,150,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall37_Cam3.avi,Fall37_Cam3,Fall,3,37,30.0,33.0,33.0,88.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall36_Cam5.avi,Fall36_Cam5,Fall,5,36,32.0,34.0,34.0,175.0,245,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall16_Cam4.avi,Fall16_Cam4,Fall,4,16,12.0,15.0,15.0,177.0,190,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall18_Cam1.avi,Fall18_Cam1,Fall,1,18,88.0,91.0,91.0,243.0,255,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall44_Cam2.avi,Fall44_Cam2,Fall,2,44,26.0,28.0,28.0,31.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall38_Cam1.avi,Fall38_Cam1,Fall,1,38,24.0,26.0,26.0,78.0,90,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall54_Cam2.avi,Fall54_Cam2,Fall,2,54,43.0,46.0,46.0,184.0,205,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL3_Cam3.avi,ADL3_Cam3,ADL,3,3,,,,,740,,, +data/Fall_Simulation_Data/videos/Fall47_Cam2.avi,Fall47_Cam2,Fall,2,47,25.0,28.0,28.0,39.0,55,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall36_Cam3.avi,Fall36_Cam3,Fall,3,36,32.0,34.0,34.0,175.0,245,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall42_Cam3.avi,Fall42_Cam3,Fall,3,42,79.0,81.0,81.0,92.0,140,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall55_Cam1.avi,Fall55_Cam1,Fall,1,55,29.0,32.0,32.0,164.0,180,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL4_Cam2.avi,ADL4_Cam2,ADL,2,4,,,,,828,,, +data/Fall_Simulation_Data/videos/Fall52_Cam5.avi,Fall52_Cam5,Fall,5,52,43.0,45.0,45.0,164.0,180,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall37_Cam1.avi,Fall37_Cam1,Fall,1,37,30.0,33.0,33.0,88.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL11_Cam4.avi,ADL11_Cam4,ADL,4,11,,,,,2130,,, +data/Fall_Simulation_Data/videos/Fall27_Cam5.avi,Fall27_Cam5,Fall,5,27,67.0,70.0,70.0,121.0,140,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall19_Cam3.avi,Fall19_Cam3,Fall,3,19,55.0,58.0,58.0,225.0,240,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall39_Cam1.avi,Fall39_Cam1,Fall,1,39,30.0,32.0,32.0,86.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall43_Cam1.avi,Fall43_Cam1,Fall,1,43,64.0,66.0,66.0,106.0,145,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall27_Cam1.avi,Fall27_Cam1,Fall,1,27,67.0,70.0,70.0,121.0,140,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL6_Cam1.avi,ADL6_Cam1,ADL,1,6,,,,,1490,,, +data/Fall_Simulation_Data/videos/Fall17_Cam2.avi,Fall17_Cam2,Fall,2,17,14.0,16.0,16.0,112.0,124,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall52_Cam1.avi,Fall52_Cam1,Fall,1,52,43.0,45.0,45.0,164.0,180,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall23_Cam4.avi,Fall23_Cam4,Fall,4,23,16.0,19.0,19.0,110.0,126,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall5_Cam5.avi,Fall5_Cam5,Fall,5,5,32.0,34.0,34.0,216.0,235,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL17_Cam2.avi,ADL17_Cam2,ADL,2,17,,,,,1875,,, +data/Fall_Simulation_Data/videos/Fall10_Cam2.avi,Fall10_Cam2,Fall,2,10,23.0,25.0,25.0,168.0,180,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL8_Cam3.avi,ADL8_Cam3,ADL,3,8,,,,,880,,, +data/Fall_Simulation_Data/videos/Fall40_Cam4.avi,Fall40_Cam4,Fall,4,40,53.0,55.0,55.0,115.0,140,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall45_Cam5.avi,Fall45_Cam5,Fall,5,45,20.0,22.0,22.0,28.0,50,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall13_Cam1.avi,Fall13_Cam1,Fall,1,13,24.0,27.0,27.0,94.0,110,True,False,4.0 +data/Fall_Simulation_Data/videos/Fall50_Cam2.avi,Fall50_Cam2,Fall,2,50,15.0,18.0,18.0,131.0,140,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall16_Cam3.avi,Fall16_Cam3,Fall,3,16,12.0,15.0,15.0,177.0,190,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall15_Cam2.avi,Fall15_Cam2,Fall,2,15,10.0,12.0,12.0,103.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL17_Cam1.avi,ADL17_Cam1,ADL,1,17,,,,,1875,,, +data/Fall_Simulation_Data/videos/Fall50_Cam3.avi,Fall50_Cam3,Fall,3,50,15.0,18.0,18.0,131.0,140,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall16_Cam5.avi,Fall16_Cam5,Fall,5,16,12.0,15.0,15.0,177.0,190,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL8_Cam5.avi,ADL8_Cam5,ADL,5,8,,,,,880,,, +data/Fall_Simulation_Data/videos/Fall8_Cam3.avi,Fall8_Cam3,Fall,3,8,79.0,82.0,82.0,188.0,200,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL2_Cam5.avi,ADL2_Cam5,ADL,5,2,,,,,1335,,, +data/Fall_Simulation_Data/videos/Fall43_Cam2.avi,Fall43_Cam2,Fall,2,43,64.0,66.0,66.0,106.0,145,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall31_Cam5.avi,Fall31_Cam5,Fall,5,31,65.0,67.0,67.0,158.0,180,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall11_Cam1.avi,Fall11_Cam1,Fall,1,11,52.0,54.0,54.0,60.0,145,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall28_Cam1.avi,Fall28_Cam1,Fall,1,28,68.0,70.0,70.0,134.0,150,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall54_Cam1.avi,Fall54_Cam1,Fall,1,54,43.0,46.0,46.0,184.0,205,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall12_Cam4.avi,Fall12_Cam4,Fall,4,12,16.0,18.0,18.0,71.0,72,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL6_Cam2.avi,ADL6_Cam2,ADL,2,6,,,,,1490,,, +data/Fall_Simulation_Data/videos/Fall31_Cam4.avi,Fall31_Cam4,Fall,4,31,65.0,67.0,67.0,158.0,180,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall13_Cam4.avi,Fall13_Cam4,Fall,4,13,24.0,27.0,27.0,94.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL17_Cam4.avi,ADL17_Cam4,ADL,4,17,,,,,1875,,, +data/Fall_Simulation_Data/videos/Fall20_Cam1.avi,Fall20_Cam1,Fall,1,20,84.0,86.0,86.0,91.0,240,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall44_Cam3.avi,Fall44_Cam3,Fall,3,44,26.0,28.0,28.0,31.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall7_Cam3.avi,Fall7_Cam3,Fall,3,7,28.0,31.0,31.0,219.0,230,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall55_Cam5.avi,Fall55_Cam5,Fall,5,55,29.0,32.0,32.0,164.0,180,True,False,5.0 +data/Fall_Simulation_Data/videos/Fall21_Cam2.avi,Fall21_Cam2,Fall,2,21,49.0,51.0,51.0,160.0,160,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall11_Cam5.avi,Fall11_Cam5,Fall,5,11,52.0,54.0,54.0,60.0,145,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL10_Cam5.avi,ADL10_Cam5,ADL,5,10,,,,,1170,,, +data/Fall_Simulation_Data/videos/Fall44_Cam5.avi,Fall44_Cam5,Fall,5,44,26.0,28.0,28.0,31.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall54_Cam3.avi,Fall54_Cam3,Fall,3,54,43.0,46.0,46.0,184.0,205,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall38_Cam5.avi,Fall38_Cam5,Fall,5,38,24.0,26.0,26.0,78.0,90,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall22_Cam3.avi,Fall22_Cam3,Fall,3,22,19.0,22.0,22.0,127.0,145,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL11_Cam5.avi,ADL11_Cam5,ADL,5,11,,,,,2130,,, +data/Fall_Simulation_Data/videos/Fall12_Cam5.avi,Fall12_Cam5,Fall,5,12,16.0,18.0,18.0,71.0,72,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL7_Cam4.avi,ADL7_Cam4,ADL,4,7,,,,,1528,,, +data/Fall_Simulation_Data/videos/Fall53_Cam4.avi,Fall53_Cam4,Fall,4,53,71.0,73.0,73.0,214.0,220,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall2_Cam5.avi,Fall2_Cam5,Fall,5,2,97.0,100.0,100.0,248.0,270,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall47_Cam5.avi,Fall47_Cam5,Fall,5,47,25.0,28.0,28.0,39.0,55,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL7_Cam2.avi,ADL7_Cam2,ADL,2,7,,,,,1528,,, +data/Fall_Simulation_Data/videos/Fall45_Cam3.avi,Fall45_Cam3,Fall,3,45,20.0,22.0,22.0,28.0,50,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall20_Cam2.avi,Fall20_Cam2,Fall,2,20,84.0,86.0,86.0,91.0,240,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall5_Cam1.avi,Fall5_Cam1,Fall,1,5,32.0,34.0,34.0,216.0,235,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL15_Cam1.avi,ADL15_Cam1,ADL,1,15,,,,,1165,,, +data/Fall_Simulation_Data/videos/ADL1_Cam3.avi,ADL1_Cam3,ADL,3,1,,,,,1800,,, +data/Fall_Simulation_Data/videos/Fall30_Cam2.avi,Fall30_Cam2,Fall,2,30,24.0,27.0,27.0,88.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall1_Cam3.avi,Fall1_Cam3,Fall,3,1,47.0,50.0,50.0,125.0,138,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall8_Cam5.avi,Fall8_Cam5,Fall,5,8,79.0,82.0,82.0,188.0,200,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall40_Cam3.avi,Fall40_Cam3,Fall,3,40,53.0,55.0,55.0,115.0,140,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall4_Cam1.avi,Fall4_Cam1,Fall,1,4,95.0,96.0,96.0,195.0,235,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall47_Cam3.avi,Fall47_Cam3,Fall,3,47,25.0,28.0,28.0,39.0,55,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL2_Cam3.avi,ADL2_Cam3,ADL,3,2,,,,,1335,,, +data/Fall_Simulation_Data/videos/Fall9_Cam5.avi,Fall9_Cam5,Fall,5,9,78.0,80.0,80.0,203.0,224,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall10_Cam3.avi,Fall10_Cam3,Fall,3,10,23.0,25.0,25.0,168.0,180,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall25_Cam5.avi,Fall25_Cam5,Fall,5,25,23.0,25.0,25.0,96.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall8_Cam1.avi,Fall8_Cam1,Fall,1,8,79.0,82.0,82.0,188.0,200,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall52_Cam4.avi,Fall52_Cam4,Fall,4,52,43.0,45.0,45.0,164.0,180,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL11_Cam2.avi,ADL11_Cam2,ADL,2,11,,,,,2130,,, +data/Fall_Simulation_Data/videos/Fall38_Cam3.avi,Fall38_Cam3,Fall,3,38,24.0,26.0,26.0,78.0,90,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall5_Cam2.avi,Fall5_Cam2,Fall,2,5,32.0,34.0,34.0,216.0,235,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall46_Cam3.avi,Fall46_Cam3,Fall,3,46,26.0,28.0,28.0,39.0,60,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall32_Cam2.avi,Fall32_Cam2,Fall,2,32,53.0,55.0,55.0,144.0,174,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall40_Cam5.avi,Fall40_Cam5,Fall,5,40,53.0,55.0,55.0,115.0,140,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall14_Cam4.avi,Fall14_Cam4,Fall,4,14,11.0,13.0,13.0,220.0,255,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall2_Cam3.avi,Fall2_Cam3,Fall,3,2,97.0,100.0,100.0,248.0,270,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall12_Cam3.avi,Fall12_Cam3,Fall,3,12,16.0,18.0,18.0,71.0,72,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall53_Cam1.avi,Fall53_Cam1,Fall,1,53,71.0,73.0,73.0,214.0,220,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall44_Cam1.avi,Fall44_Cam1,Fall,1,44,26.0,28.0,28.0,31.0,110,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL14_Cam3.avi,ADL14_Cam3,ADL,3,14,,,,,1450,,, +data/Fall_Simulation_Data/videos/Fall33_Cam4.avi,Fall33_Cam4,Fall,4,33,28.0,30.0,30.0,200.0,225,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL1_Cam4.avi,ADL1_Cam4,ADL,4,1,,,,,1800,,, +data/Fall_Simulation_Data/videos/Fall29_Cam1.avi,Fall29_Cam1,Fall,1,29,23.0,25.0,25.0,37.0,120,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL4_Cam1.avi,ADL4_Cam1,ADL,1,4,,,,,828,,, +data/Fall_Simulation_Data/videos/Fall41_Cam5.avi,Fall41_Cam5,Fall,5,41,39.0,42.0,42.0,95.0,140,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall51_Cam1.avi,Fall51_Cam1,Fall,1,51,28.0,31.0,31.0,140.0,150,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall19_Cam2.avi,Fall19_Cam2,Fall,2,19,55.0,58.0,58.0,225.0,240,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL13_Cam5.avi,ADL13_Cam5,ADL,5,13,,,,,860,,, +data/Fall_Simulation_Data/videos/Fall55_Cam2.avi,Fall55_Cam2,Fall,2,55,29.0,32.0,32.0,164.0,180,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL4_Cam4.avi,ADL4_Cam4,ADL,4,4,,,,,828,,, +data/Fall_Simulation_Data/videos/Fall21_Cam3.avi,Fall21_Cam3,Fall,3,21,49.0,51.0,51.0,160.0,160,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall18_Cam4.avi,Fall18_Cam4,Fall,4,18,88.0,91.0,91.0,243.0,255,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL14_Cam4.avi,ADL14_Cam4,ADL,4,14,,,,,1450,,, +data/Fall_Simulation_Data/videos/Fall17_Cam3.avi,Fall17_Cam3,Fall,3,17,14.0,16.0,16.0,112.0,124,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall31_Cam3.avi,Fall31_Cam3,Fall,3,31,65.0,67.0,67.0,158.0,180,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall9_Cam2.avi,Fall9_Cam2,Fall,2,9,78.0,80.0,80.0,203.0,224,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL9_Cam3.avi,ADL9_Cam3,ADL,3,9,,,,,1140,,, +data/Fall_Simulation_Data/videos/ADL6_Cam4.avi,ADL6_Cam4,ADL,4,6,,,,,1490,,, +data/Fall_Simulation_Data/videos/Fall11_Cam3.avi,Fall11_Cam3,Fall,3,11,52.0,54.0,54.0,60.0,145,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall8_Cam4.avi,Fall8_Cam4,Fall,4,8,79.0,82.0,82.0,188.0,200,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall1_Cam4.avi,Fall1_Cam4,Fall,4,1,47.0,50.0,50.0,125.0,138,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL16_Cam2.avi,ADL16_Cam2,ADL,2,16,,,,,840,,, +data/Fall_Simulation_Data/videos/Fall33_Cam1.avi,Fall33_Cam1,Fall,1,33,28.0,30.0,30.0,200.0,225,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall14_Cam3.avi,Fall14_Cam3,Fall,3,14,11.0,13.0,13.0,220.0,255,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL2_Cam1.avi,ADL2_Cam1,ADL,1,2,,,,,1335,,, +data/Fall_Simulation_Data/videos/Fall34_Cam5.avi,Fall34_Cam5,Fall,5,34,25.0,28.0,28.0,241.0,265,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall20_Cam3.avi,Fall20_Cam3,Fall,3,20,84.0,86.0,86.0,91.0,240,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall2_Cam1.avi,Fall2_Cam1,Fall,1,2,97.0,100.0,100.0,248.0,270,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall26_Cam3.avi,Fall26_Cam3,Fall,3,26,15.0,18.0,18.0,106.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall49_Cam5.avi,Fall49_Cam5,Fall,5,49,24.0,26.0,26.0,123.0,145,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall49_Cam4.avi,Fall49_Cam4,Fall,4,49,24.0,26.0,26.0,123.0,145,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL13_Cam1.avi,ADL13_Cam1,ADL,1,13,,,,,860,,, +data/Fall_Simulation_Data/videos/Fall14_Cam5.avi,Fall14_Cam5,Fall,5,14,11.0,13.0,13.0,220.0,255,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall32_Cam1.avi,Fall32_Cam1,Fall,1,32,53.0,55.0,55.0,144.0,174,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall4_Cam3.avi,Fall4_Cam3,Fall,3,4,95.0,96.0,96.0,195.0,235,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL1_Cam5.avi,ADL1_Cam5,ADL,5,1,,,,,1800,,, +data/Fall_Simulation_Data/videos/Fall25_Cam4.avi,Fall25_Cam4,Fall,4,25,23.0,25.0,25.0,96.0,110,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall36_Cam1.avi,Fall36_Cam1,Fall,1,36,32.0,34.0,34.0,175.0,245,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall41_Cam1.avi,Fall41_Cam1,Fall,1,41,39.0,42.0,42.0,95.0,140,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall49_Cam3.avi,Fall49_Cam3,Fall,3,49,24.0,26.0,26.0,123.0,145,True,False,5.0 +data/Fall_Simulation_Data/videos/Fall19_Cam4.avi,Fall19_Cam4,Fall,4,19,55.0,58.0,58.0,225.0,240,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall48_Cam2.avi,Fall48_Cam2,Fall,2,48,32.0,34.0,34.0,47.0,70,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall52_Cam3.avi,Fall52_Cam3,Fall,3,52,43.0,45.0,45.0,164.0,180,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall20_Cam5.avi,Fall20_Cam5,Fall,5,20,84.0,86.0,86.0,91.0,240,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall3_Cam4.avi,Fall3_Cam4,Fall,4,3,128.0,131.0,131.0,224.0,235,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL16_Cam5.avi,ADL16_Cam5,ADL,5,16,,,,,840,,, +data/Fall_Simulation_Data/videos/Fall34_Cam1.avi,Fall34_Cam1,Fall,1,34,25.0,28.0,28.0,241.0,265,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL11_Cam3.avi,ADL11_Cam3,ADL,3,11,,,,,2130,,, +data/Fall_Simulation_Data/videos/Fall1_Cam2.avi,Fall1_Cam2,Fall,2,1,47.0,50.0,50.0,125.0,138,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL6_Cam3.avi,ADL6_Cam3,ADL,3,6,,,,,1490,,, +data/Fall_Simulation_Data/videos/ADL8_Cam4.avi,ADL8_Cam4,ADL,4,8,,,,,880,,, +data/Fall_Simulation_Data/videos/Fall36_Cam4.avi,Fall36_Cam4,Fall,4,36,32.0,34.0,34.0,175.0,245,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall48_Cam4.avi,Fall48_Cam4,Fall,4,48,32.0,34.0,34.0,47.0,70,True,True,3.0 +data/Fall_Simulation_Data/videos/ADL11_Cam1.avi,ADL11_Cam1,ADL,1,11,,,,,2130,,, +data/Fall_Simulation_Data/videos/Fall48_Cam5.avi,Fall48_Cam5,Fall,5,48,32.0,34.0,34.0,47.0,70,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall43_Cam4.avi,Fall43_Cam4,Fall,4,43,64.0,66.0,66.0,106.0,145,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL9_Cam1.avi,ADL9_Cam1,ADL,1,9,,,,,1140,,, +data/Fall_Simulation_Data/videos/Fall37_Cam4.avi,Fall37_Cam4,Fall,4,37,30.0,33.0,33.0,88.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL14_Cam1.avi,ADL14_Cam1,ADL,1,14,,,,,1450,,, +data/Fall_Simulation_Data/videos/Fall13_Cam2.avi,Fall13_Cam2,Fall,2,13,24.0,27.0,27.0,94.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall29_Cam3.avi,Fall29_Cam3,Fall,3,29,23.0,25.0,25.0,37.0,120,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL1_Cam1.avi,ADL1_Cam1,ADL,1,1,,,,,1800,,, diff --git a/data/Fall_Simulation_Data/annotations_val.csv b/data/Fall_Simulation_Data/annotations_val.csv new file mode 100644 index 0000000..93f77e8 --- /dev/null +++ b/data/Fall_Simulation_Data/annotations_val.csv @@ -0,0 +1,37 @@ +video_path,video_name,category,camera_id,scenario_id,fall_start,fall_end,lying_start,lying_end,length,fall_visible,lying_visible,ranking +data/Fall_Simulation_Data/videos/Fall30_Cam5.avi,Fall30_Cam5,Fall,5,30,24.0,27.0,27.0,88.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall40_Cam1.avi,Fall40_Cam1,Fall,1,40,53.0,55.0,55.0,115.0,140,True,True,2.0 +data/Fall_Simulation_Data/videos/ADL9_Cam4.avi,ADL9_Cam4,ADL,4,9,,,,,1140,,, +data/Fall_Simulation_Data/videos/Fall32_Cam4.avi,Fall32_Cam4,Fall,4,32,53.0,55.0,55.0,144.0,174,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall9_Cam1.avi,Fall9_Cam1,Fall,1,9,78.0,80.0,80.0,203.0,224,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall24_Cam5.avi,Fall24_Cam5,Fall,5,24,30.0,33.0,33.0,97.0,130,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall28_Cam5.avi,Fall28_Cam5,Fall,5,28,68.0,70.0,70.0,134.0,150,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall25_Cam2.avi,Fall25_Cam2,Fall,2,25,23.0,25.0,25.0,96.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall32_Cam3.avi,Fall32_Cam3,Fall,3,32,53.0,55.0,55.0,144.0,174,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall21_Cam1.avi,Fall21_Cam1,Fall,1,21,49.0,51.0,51.0,160.0,160,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall49_Cam1.avi,Fall49_Cam1,Fall,1,49,24.0,26.0,26.0,123.0,145,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall43_Cam3.avi,Fall43_Cam3,Fall,3,43,64.0,66.0,66.0,106.0,145,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall17_Cam5.avi,Fall17_Cam5,Fall,5,17,14.0,16.0,16.0,112.0,124,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL5_Cam5.avi,ADL5_Cam5,ADL,5,5,,,,,698,,, +data/Fall_Simulation_Data/videos/ADL15_Cam3.avi,ADL15_Cam3,ADL,3,15,,,,,1165,,, +data/Fall_Simulation_Data/videos/Fall38_Cam2.avi,Fall38_Cam2,Fall,2,38,24.0,26.0,26.0,78.0,90,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall17_Cam1.avi,Fall17_Cam1,Fall,1,17,14.0,16.0,16.0,112.0,124,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall13_Cam5.avi,Fall13_Cam5,Fall,5,13,24.0,27.0,27.0,94.0,110,True,False,5.0 +data/Fall_Simulation_Data/videos/Fall26_Cam2.avi,Fall26_Cam2,Fall,2,26,15.0,18.0,18.0,106.0,110,True,True,5.0 +data/Fall_Simulation_Data/videos/Fall15_Cam1.avi,Fall15_Cam1,Fall,1,15,10.0,12.0,12.0,103.0,110,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall45_Cam4.avi,Fall45_Cam4,Fall,4,45,20.0,22.0,22.0,28.0,50,True,True,2.0 +data/Fall_Simulation_Data/videos/Fall6_Cam2.avi,Fall6_Cam2,Fall,2,6,44.0,47.0,47.0,238.0,255,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall20_Cam4.avi,Fall20_Cam4,Fall,4,20,84.0,86.0,86.0,91.0,240,True,True,3.0 +data/Fall_Simulation_Data/videos/Fall9_Cam4.avi,Fall9_Cam4,Fall,4,9,78.0,80.0,80.0,203.0,224,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall3_Cam5.avi,Fall3_Cam5,Fall,5,3,128.0,131.0,131.0,224.0,235,True,True,4.0 +data/Fall_Simulation_Data/videos/Fall25_Cam3.avi,Fall25_Cam3,Fall,3,25,23.0,25.0,25.0,96.0,110,True,True,1.0 +data/Fall_Simulation_Data/videos/Fall6_Cam3.avi,Fall6_Cam3,Fall,3,6,44.0,47.0,47.0,238.0,255,True,True,4.0 +data/Fall_Simulation_Data/videos/ADL8_Cam1.avi,ADL8_Cam1,ADL,1,8,,,,,880,,, +data/Fall_Simulation_Data/videos/ADL2_Cam2.avi,ADL2_Cam2,ADL,2,2,,,,,1335,,, +data/Fall_Simulation_Data/videos/Fall53_Cam2.avi,Fall53_Cam2,Fall,2,53,71.0,73.0,73.0,214.0,220,True,True,5.0 +data/Fall_Simulation_Data/videos/ADL12_Cam2.avi,ADL12_Cam2,ADL,2,12,,,,,1420,,, +data/Fall_Simulation_Data/videos/Fall22_Cam2.avi,Fall22_Cam2,Fall,2,22,19.0,22.0,22.0,127.0,145,True,True,1.0 +data/Fall_Simulation_Data/videos/ADL10_Cam4.avi,ADL10_Cam4,ADL,4,10,,,,,1170,,, +data/Fall_Simulation_Data/videos/ADL7_Cam1.avi,ADL7_Cam1,ADL,1,7,,,,,1528,,, +data/Fall_Simulation_Data/videos/ADL2_Cam4.avi,ADL2_Cam4,ADL,4,2,,,,,1335,,, +data/Fall_Simulation_Data/videos/Fall53_Cam5.avi,Fall53_Cam5,Fall,5,53,71.0,73.0,73.0,214.0,220,True,True,2.0 diff --git a/environment.yml b/environment.yml index 235998a..d59cb54 100644 --- a/environment.yml +++ b/environment.yml @@ -15,6 +15,7 @@ dependencies: - pytorch::torchvision>=0.16 - pandas>=2.1 - openpyxl>=3.0 + - scikit-learn>=1.3 - pip: # code-checks diff --git a/notebooks/dataset_split.ipynb b/notebooks/dataset_split.ipynb new file mode 100644 index 0000000..bfaecc7 --- /dev/null +++ b/notebooks/dataset_split.ipynb @@ -0,0 +1,1514 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "import os\n", + "\n", + "sys.path.append(os.getcwd() + \"/../\")\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "from scripts.split_dataset import split_dataset" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
video_pathvideo_namecategorycamera_idscenario_idfall_startfall_endlying_startlying_endlengthfall_visiblelying_visibleranking
0data/Fall_Simulation_Data/videos/ADL17_Cam1.aviADL17_Cam1ADL117NaNNaNNaNNaN1875NaNNaNNaN
1data/Fall_Simulation_Data/videos/ADL16_Cam1.aviADL16_Cam1ADL116NaNNaNNaNNaN840NaNNaNNaN
2data/Fall_Simulation_Data/videos/Fall30_Cam3.aviFall30_Cam3Fall33024.027.027.088.0110TrueTrue3.0
3data/Fall_Simulation_Data/videos/Fall19_Cam4.aviFall19_Cam4Fall41955.058.058.0225.0240TrueTrue4.0
4data/Fall_Simulation_Data/videos/Fall18_Cam4.aviFall18_Cam4Fall41888.091.091.0243.0255TrueTrue5.0
\n", + "
" + ], + "text/plain": [ + " video_path video_name category \\\n", + "0 data/Fall_Simulation_Data/videos/ADL17_Cam1.avi ADL17_Cam1 ADL \n", + "1 data/Fall_Simulation_Data/videos/ADL16_Cam1.avi ADL16_Cam1 ADL \n", + "2 data/Fall_Simulation_Data/videos/Fall30_Cam3.avi Fall30_Cam3 Fall \n", + "3 data/Fall_Simulation_Data/videos/Fall19_Cam4.avi Fall19_Cam4 Fall \n", + "4 data/Fall_Simulation_Data/videos/Fall18_Cam4.avi Fall18_Cam4 Fall \n", + "\n", + " camera_id scenario_id fall_start fall_end lying_start lying_end \\\n", + "0 1 17 NaN NaN NaN NaN \n", + "1 1 16 NaN NaN NaN NaN \n", + "2 3 30 24.0 27.0 27.0 88.0 \n", + "3 4 19 55.0 58.0 58.0 225.0 \n", + "4 4 18 88.0 91.0 91.0 243.0 \n", + "\n", + " length fall_visible lying_visible ranking \n", + "0 1875 NaN NaN NaN \n", + "1 840 NaN NaN NaN \n", + "2 110 True True 3.0 \n", + "3 240 True True 4.0 \n", + "4 255 True True 5.0 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
camera_idscenario_idfall_startfall_endlying_startlying_endlengthranking
count357.000000357.000000272.000000272.000000272.000000272.000000357.000000272.000000
mean3.00840323.37535041.60294144.04044144.040441138.400735424.0056022.992647
std1.41716516.23957826.26020226.22754226.22754262.439264510.2440541.408966
min1.0000001.00000010.00000012.00000012.00000028.00000050.0000001.000000
25%2.0000009.00000024.00000026.00000026.00000092.000000138.0000002.000000
50%3.00000019.00000030.00000033.00000033.000000127.000000190.0000003.000000
75%4.00000037.00000055.00000058.00000058.000000195.000000270.0000004.000000
max5.00000055.000000128.000000131.000000131.000000248.0000002130.0000005.000000
\n", + "
" + ], + "text/plain": [ + " camera_id scenario_id fall_start fall_end lying_start \\\n", + "count 357.000000 357.000000 272.000000 272.000000 272.000000 \n", + "mean 3.008403 23.375350 41.602941 44.040441 44.040441 \n", + "std 1.417165 16.239578 26.260202 26.227542 26.227542 \n", + "min 1.000000 1.000000 10.000000 12.000000 12.000000 \n", + "25% 2.000000 9.000000 24.000000 26.000000 26.000000 \n", + "50% 3.000000 19.000000 30.000000 33.000000 33.000000 \n", + "75% 4.000000 37.000000 55.000000 58.000000 58.000000 \n", + "max 5.000000 55.000000 128.000000 131.000000 131.000000 \n", + "\n", + " lying_end length ranking \n", + "count 272.000000 357.000000 272.000000 \n", + "mean 138.400735 424.005602 2.992647 \n", + "std 62.439264 510.244054 1.408966 \n", + "min 28.000000 50.000000 1.000000 \n", + "25% 92.000000 138.000000 2.000000 \n", + "50% 127.000000 190.000000 3.000000 \n", + "75% 195.000000 270.000000 4.000000 \n", + "max 248.000000 2130.000000 5.000000 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 357 entries, 0 to 356\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 video_path 357 non-null object \n", + " 1 video_name 357 non-null object \n", + " 2 category 357 non-null object \n", + " 3 camera_id 357 non-null int64 \n", + " 4 scenario_id 357 non-null int64 \n", + " 5 fall_start 272 non-null float64\n", + " 6 fall_end 272 non-null float64\n", + " 7 lying_start 272 non-null float64\n", + " 8 lying_end 272 non-null float64\n", + " 9 length 357 non-null int64 \n", + " 10 fall_visible 272 non-null object \n", + " 11 lying_visible 272 non-null object \n", + " 12 ranking 272 non-null float64\n", + "dtypes: float64(5), int64(3), object(5)\n", + "memory usage: 36.4+ KB\n" + ] + }, + { + "data": { + "text/plain": [ + "None" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "category\n", + "Fall 0.761905\n", + "ADL 0.238095\n", + "Name: count, dtype: float64" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "raw_dataset = pd.read_csv(\"../data/Fall_Simulation_Data/annotations.csv\")\n", + "\n", + "display(raw_dataset.head())\n", + "\n", + "display(raw_dataset.describe())\n", + "\n", + "display(raw_dataset.info())\n", + "\n", + "display(raw_dataset[\"category\"].value_counts() / len(raw_dataset))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Split the data!\n", + "\n", + "We split the data into train, test, and validation csv files on a per video level.\n", + "Since ADL videos are much longer (and thus produce more samples in our method), we\n", + "want to keep the proportion of ADL videos vs. Fall videos similar among the different\n", + "splits. Hence, we stratify by the `category` column.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "SPLIT = (0.7, 0.2, 0.1)\n", + "\n", + "train_df, test_df, val_df = split_dataset(\n", + " annotations=raw_dataset,\n", + " output_path=\"../data/Fall_Simulation_Data/\",\n", + " split=SPLIT,\n", + " random_seed=42,\n", + " stratify=\"category\",\n", + " save_splits=True,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'------------------- Train -------------------'" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
video_pathvideo_namecategorycamera_idscenario_idfall_startfall_endlying_startlying_endlengthfall_visiblelying_visibleranking
105data/Fall_Simulation_Data/videos/Fall7_Cam4.aviFall7_Cam4Fall4728.031.031.0219.0230TrueTrue2.0
338data/Fall_Simulation_Data/videos/Fall23_Cam3.aviFall23_Cam3Fall32316.019.019.0110.0126TrueTrue3.0
139data/Fall_Simulation_Data/videos/Fall7_Cam2.aviFall7_Cam2Fall2728.031.031.0219.0230TrueTrue4.0
11data/Fall_Simulation_Data/videos/Fall50_Cam4.aviFall50_Cam4Fall45015.018.018.0131.0140TrueTrue1.0
350data/Fall_Simulation_Data/videos/Fall34_Cam4.aviFall34_Cam4Fall43425.028.028.0241.0265TrueTrue4.0
\n", + "
" + ], + "text/plain": [ + " video_path video_name category \\\n", + "105 data/Fall_Simulation_Data/videos/Fall7_Cam4.avi Fall7_Cam4 Fall \n", + "338 data/Fall_Simulation_Data/videos/Fall23_Cam3.avi Fall23_Cam3 Fall \n", + "139 data/Fall_Simulation_Data/videos/Fall7_Cam2.avi Fall7_Cam2 Fall \n", + "11 data/Fall_Simulation_Data/videos/Fall50_Cam4.avi Fall50_Cam4 Fall \n", + "350 data/Fall_Simulation_Data/videos/Fall34_Cam4.avi Fall34_Cam4 Fall \n", + "\n", + " camera_id scenario_id fall_start fall_end lying_start lying_end \\\n", + "105 4 7 28.0 31.0 31.0 219.0 \n", + "338 3 23 16.0 19.0 19.0 110.0 \n", + "139 2 7 28.0 31.0 31.0 219.0 \n", + "11 4 50 15.0 18.0 18.0 131.0 \n", + "350 4 34 25.0 28.0 28.0 241.0 \n", + "\n", + " length fall_visible lying_visible ranking \n", + "105 230 True True 2.0 \n", + "338 126 True True 3.0 \n", + "139 230 True True 4.0 \n", + "11 140 True True 1.0 \n", + "350 265 True True 4.0 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
camera_idscenario_idfall_startfall_endlying_startlying_endlengthranking
count249.000000249.000000190.000000190.000000190.000000190.000000249.000000190.000000
mean2.93574323.59437842.42105344.86842144.868421140.952632435.3212852.963158
std1.42411816.67212726.00206725.95862725.95862762.717920531.1650851.434168
min1.0000001.00000010.00000012.00000012.00000028.00000050.0000001.000000
25%2.0000009.00000024.00000026.00000026.00000092.500000140.0000002.000000
50%3.00000019.00000032.00000034.00000034.000000134.000000200.0000003.000000
75%4.00000038.00000055.00000058.00000058.000000188.000000270.0000004.000000
max5.00000055.000000128.000000131.000000131.000000248.0000002130.0000005.000000
\n", + "
" + ], + "text/plain": [ + " camera_id scenario_id fall_start fall_end lying_start \\\n", + "count 249.000000 249.000000 190.000000 190.000000 190.000000 \n", + "mean 2.935743 23.594378 42.421053 44.868421 44.868421 \n", + "std 1.424118 16.672127 26.002067 25.958627 25.958627 \n", + "min 1.000000 1.000000 10.000000 12.000000 12.000000 \n", + "25% 2.000000 9.000000 24.000000 26.000000 26.000000 \n", + "50% 3.000000 19.000000 32.000000 34.000000 34.000000 \n", + "75% 4.000000 38.000000 55.000000 58.000000 58.000000 \n", + "max 5.000000 55.000000 128.000000 131.000000 131.000000 \n", + "\n", + " lying_end length ranking \n", + "count 190.000000 249.000000 190.000000 \n", + "mean 140.952632 435.321285 2.963158 \n", + "std 62.717920 531.165085 1.434168 \n", + "min 28.000000 50.000000 1.000000 \n", + "25% 92.500000 140.000000 2.000000 \n", + "50% 134.000000 200.000000 3.000000 \n", + "75% 188.000000 270.000000 4.000000 \n", + "max 248.000000 2130.000000 5.000000 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 249 entries, 105 to 263\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 video_path 249 non-null object \n", + " 1 video_name 249 non-null object \n", + " 2 category 249 non-null object \n", + " 3 camera_id 249 non-null int64 \n", + " 4 scenario_id 249 non-null int64 \n", + " 5 fall_start 190 non-null float64\n", + " 6 fall_end 190 non-null float64\n", + " 7 lying_start 190 non-null float64\n", + " 8 lying_end 190 non-null float64\n", + " 9 length 249 non-null int64 \n", + " 10 fall_visible 190 non-null object \n", + " 11 lying_visible 190 non-null object \n", + " 12 ranking 190 non-null float64\n", + "dtypes: float64(5), int64(3), object(5)\n", + "memory usage: 27.2+ KB\n" + ] + }, + { + "data": { + "text/plain": [ + "None" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "category\n", + "Fall 0.763052\n", + "ADL 0.236948\n", + "Name: count, dtype: float64" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "'------------------- Test -------------------'" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
video_pathvideo_namecategorycamera_idscenario_idfall_startfall_endlying_startlying_endlengthfall_visiblelying_visibleranking
255data/Fall_Simulation_Data/videos/Fall3_Cam2.aviFall3_Cam2Fall23128.0131.0131.0224.0235TrueTrue2.0
80data/Fall_Simulation_Data/videos/Fall13_Cam3.aviFall13_Cam3Fall31324.027.027.094.0110TrueTrue3.0
37data/Fall_Simulation_Data/videos/Fall1_Cam1.aviFall1_Cam1Fall1147.050.050.0125.0138TrueTrue5.0
239data/Fall_Simulation_Data/videos/Fall45_Cam2.aviFall45_Cam2Fall24520.022.022.028.050TrueTrue1.0
159data/Fall_Simulation_Data/videos/ADL10_Cam3.aviADL10_Cam3ADL310NaNNaNNaNNaN1170NaNNaNNaN
\n", + "
" + ], + "text/plain": [ + " video_path video_name category \\\n", + "255 data/Fall_Simulation_Data/videos/Fall3_Cam2.avi Fall3_Cam2 Fall \n", + "80 data/Fall_Simulation_Data/videos/Fall13_Cam3.avi Fall13_Cam3 Fall \n", + "37 data/Fall_Simulation_Data/videos/Fall1_Cam1.avi Fall1_Cam1 Fall \n", + "239 data/Fall_Simulation_Data/videos/Fall45_Cam2.avi Fall45_Cam2 Fall \n", + "159 data/Fall_Simulation_Data/videos/ADL10_Cam3.avi ADL10_Cam3 ADL \n", + "\n", + " camera_id scenario_id fall_start fall_end lying_start lying_end \\\n", + "255 2 3 128.0 131.0 131.0 224.0 \n", + "80 3 13 24.0 27.0 27.0 94.0 \n", + "37 1 1 47.0 50.0 50.0 125.0 \n", + "239 2 45 20.0 22.0 22.0 28.0 \n", + "159 3 10 NaN NaN NaN NaN \n", + "\n", + " length fall_visible lying_visible ranking \n", + "255 235 True True 2.0 \n", + "80 110 True True 3.0 \n", + "37 138 True True 5.0 \n", + "239 50 True True 1.0 \n", + "159 1170 NaN NaN NaN " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
camera_idscenario_idfall_startfall_endlying_startlying_endlengthranking
count72.00000072.00000055.00000055.00000055.00000055.00000072.00000055.000000
mean3.27777823.59722237.34545539.81818239.818182130.472727389.1666673.036364
std1.33450715.42967725.96451925.98154025.98154064.885327457.1788261.304744
min1.0000001.00000010.00000012.00000012.00000028.00000050.0000001.000000
25%2.00000010.00000023.50000025.50000025.50000088.000000117.5000002.000000
50%3.00000025.00000028.00000030.00000030.000000121.000000165.0000003.000000
75%4.00000035.00000044.00000047.00000047.000000197.500000255.0000004.000000
max5.00000052.000000128.000000131.000000131.000000238.0000001800.0000005.000000
\n", + "
" + ], + "text/plain": [ + " camera_id scenario_id fall_start fall_end lying_start \\\n", + "count 72.000000 72.000000 55.000000 55.000000 55.000000 \n", + "mean 3.277778 23.597222 37.345455 39.818182 39.818182 \n", + "std 1.334507 15.429677 25.964519 25.981540 25.981540 \n", + "min 1.000000 1.000000 10.000000 12.000000 12.000000 \n", + "25% 2.000000 10.000000 23.500000 25.500000 25.500000 \n", + "50% 3.000000 25.000000 28.000000 30.000000 30.000000 \n", + "75% 4.000000 35.000000 44.000000 47.000000 47.000000 \n", + "max 5.000000 52.000000 128.000000 131.000000 131.000000 \n", + "\n", + " lying_end length ranking \n", + "count 55.000000 72.000000 55.000000 \n", + "mean 130.472727 389.166667 3.036364 \n", + "std 64.885327 457.178826 1.304744 \n", + "min 28.000000 50.000000 1.000000 \n", + "25% 88.000000 117.500000 2.000000 \n", + "50% 121.000000 165.000000 3.000000 \n", + "75% 197.500000 255.000000 4.000000 \n", + "max 238.000000 1800.000000 5.000000 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 72 entries, 255 to 275\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 video_path 72 non-null object \n", + " 1 video_name 72 non-null object \n", + " 2 category 72 non-null object \n", + " 3 camera_id 72 non-null int64 \n", + " 4 scenario_id 72 non-null int64 \n", + " 5 fall_start 55 non-null float64\n", + " 6 fall_end 55 non-null float64\n", + " 7 lying_start 55 non-null float64\n", + " 8 lying_end 55 non-null float64\n", + " 9 length 72 non-null int64 \n", + " 10 fall_visible 55 non-null object \n", + " 11 lying_visible 55 non-null object \n", + " 12 ranking 55 non-null float64\n", + "dtypes: float64(5), int64(3), object(5)\n", + "memory usage: 7.9+ KB\n" + ] + }, + { + "data": { + "text/plain": [ + "None" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "category\n", + "Fall 0.763889\n", + "ADL 0.236111\n", + "Name: count, dtype: float64" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "'------------------- Val -------------------'" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
video_pathvideo_namecategorycamera_idscenario_idfall_startfall_endlying_startlying_endlengthfall_visiblelying_visibleranking
44data/Fall_Simulation_Data/videos/Fall30_Cam5.aviFall30_Cam5Fall53024.027.027.088.0110TrueTrue5.0
143data/Fall_Simulation_Data/videos/Fall40_Cam1.aviFall40_Cam1Fall14053.055.055.0115.0140TrueTrue2.0
110data/Fall_Simulation_Data/videos/ADL9_Cam4.aviADL9_Cam4ADL49NaNNaNNaNNaN1140NaNNaNNaN
208data/Fall_Simulation_Data/videos/Fall32_Cam4.aviFall32_Cam4Fall43253.055.055.0144.0174TrueTrue4.0
254data/Fall_Simulation_Data/videos/Fall9_Cam1.aviFall9_Cam1Fall1978.080.080.0203.0224TrueTrue2.0
\n", + "
" + ], + "text/plain": [ + " video_path video_name category \\\n", + "44 data/Fall_Simulation_Data/videos/Fall30_Cam5.avi Fall30_Cam5 Fall \n", + "143 data/Fall_Simulation_Data/videos/Fall40_Cam1.avi Fall40_Cam1 Fall \n", + "110 data/Fall_Simulation_Data/videos/ADL9_Cam4.avi ADL9_Cam4 ADL \n", + "208 data/Fall_Simulation_Data/videos/Fall32_Cam4.avi Fall32_Cam4 Fall \n", + "254 data/Fall_Simulation_Data/videos/Fall9_Cam1.avi Fall9_Cam1 Fall \n", + "\n", + " camera_id scenario_id fall_start fall_end lying_start lying_end \\\n", + "44 5 30 24.0 27.0 27.0 88.0 \n", + "143 1 40 53.0 55.0 55.0 115.0 \n", + "110 4 9 NaN NaN NaN NaN \n", + "208 4 32 53.0 55.0 55.0 144.0 \n", + "254 1 9 78.0 80.0 80.0 203.0 \n", + "\n", + " length fall_visible lying_visible ranking \n", + "44 110 True True 5.0 \n", + "143 140 True True 2.0 \n", + "110 1140 NaN NaN NaN \n", + "208 174 True True 4.0 \n", + "254 224 True True 2.0 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
camera_idscenario_idfall_startfall_endlying_startlying_endlengthranking
count36.00000036.00000027.00000027.00000027.00000027.00000036.00000027.000000
mean2.97222221.41666744.51851946.81481546.814815136.592593415.4166673.111111
std1.50211515.01879828.64822528.61419428.61419455.805472470.6412871.476309
min1.0000002.00000010.00000012.00000012.00000028.00000050.0000001.000000
25%2.0000009.00000023.00000025.00000025.00000096.500000124.0000002.000000
50%3.00000018.50000044.00000047.00000047.000000115.000000174.0000003.000000
75%4.00000030.50000066.00000068.00000068.000000181.500000365.7500004.000000
max5.00000053.000000128.000000131.000000131.000000238.0000001528.0000005.000000
\n", + "
" + ], + "text/plain": [ + " camera_id scenario_id fall_start fall_end lying_start \\\n", + "count 36.000000 36.000000 27.000000 27.000000 27.000000 \n", + "mean 2.972222 21.416667 44.518519 46.814815 46.814815 \n", + "std 1.502115 15.018798 28.648225 28.614194 28.614194 \n", + "min 1.000000 2.000000 10.000000 12.000000 12.000000 \n", + "25% 2.000000 9.000000 23.000000 25.000000 25.000000 \n", + "50% 3.000000 18.500000 44.000000 47.000000 47.000000 \n", + "75% 4.000000 30.500000 66.000000 68.000000 68.000000 \n", + "max 5.000000 53.000000 128.000000 131.000000 131.000000 \n", + "\n", + " lying_end length ranking \n", + "count 27.000000 36.000000 27.000000 \n", + "mean 136.592593 415.416667 3.111111 \n", + "std 55.805472 470.641287 1.476309 \n", + "min 28.000000 50.000000 1.000000 \n", + "25% 96.500000 124.000000 2.000000 \n", + "50% 115.000000 174.000000 3.000000 \n", + "75% 181.500000 365.750000 4.000000 \n", + "max 238.000000 1528.000000 5.000000 " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 36 entries, 44 to 252\n", + "Data columns (total 13 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 video_path 36 non-null object \n", + " 1 video_name 36 non-null object \n", + " 2 category 36 non-null object \n", + " 3 camera_id 36 non-null int64 \n", + " 4 scenario_id 36 non-null int64 \n", + " 5 fall_start 27 non-null float64\n", + " 6 fall_end 27 non-null float64\n", + " 7 lying_start 27 non-null float64\n", + " 8 lying_end 27 non-null float64\n", + " 9 length 36 non-null int64 \n", + " 10 fall_visible 27 non-null object \n", + " 11 lying_visible 27 non-null object \n", + " 12 ranking 27 non-null float64\n", + "dtypes: float64(5), int64(3), object(5)\n", + "memory usage: 3.9+ KB\n" + ] + }, + { + "data": { + "text/plain": [ + "None" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "category\n", + "Fall 0.75\n", + "ADL 0.25\n", + "Name: count, dtype: float64" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "display(\"------------------- Train -------------------\")\n", + "display(train_df.head())\n", + "display(train_df.describe())\n", + "display(train_df.info())\n", + "display(train_df[\"category\"].value_counts() / len(train_df))\n", + "\n", + "display(\"------------------- Test -------------------\")\n", + "display(test_df.head())\n", + "display(test_df.describe())\n", + "display(test_df.info())\n", + "display(test_df[\"category\"].value_counts() / len(test_df))\n", + "\n", + "display(\"------------------- Val -------------------\")\n", + "display(val_df.head())\n", + "display(val_df.describe())\n", + "display(val_df.info())\n", + "display(val_df[\"category\"].value_counts() / len(val_df))" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "human-fall-detection", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/pyproject.toml b/pyproject.toml index 0643991..0eb79a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,10 @@ skip-magic-trailing-comma = false # Like Black, automatically detect the appropriate line ending. line-ending = "auto" +[tool.ruff.lint.per-file-ignores] +# Ignore imports at the top of file error in notebooks. +"**.ipynb" = ["E402"] + [[tool.mypy.overrides]] module = ["mmaction.*", "mmengine.*"] ignore_missing_imports = true diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/split_dataset.py b/scripts/split_dataset.py new file mode 100644 index 0000000..d8b2eba --- /dev/null +++ b/scripts/split_dataset.py @@ -0,0 +1,175 @@ +"""This script takes the path to our converted annotation file and +splits it into a training, testing, and optionally validation dataset.""" + + +import argparse +import logging +from math import isclose +from pathlib import Path + +import numpy as np +import pandas as pd +from sklearn.model_selection import train_test_split # type: ignore + +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO) + + +def split_dataset( + annotations: Path | str | pd.DataFrame, + output_path: Path | str | None = None, + split: tuple[float, float, float] = (0.7, 0.2, 0.1), + random_seed: int = 42, + stratify: str | None = None, + save_splits: bool = False, +) -> tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]: + """Splits the dataset into training, testing, and validation datasets. + + Args: + annotations (Path | str | pd.Dataframe): Path to the (complete) annotation CSV file. + Or a pandas dataframe containing the annotations. + output_path (Path | str | None): Path to the output directory. The output + files will have the same name as the input file, with the suffixes _train, + _test, and _val. Defaults to None and uses the same folder as the + `annotation_path`. + split (tuple[float, float, float]): Tuple of three floats indicating the proportions + of the dataset to use for training, testing, and validation (in that order). Each + value should be between 0.0 and 1.0, and the sum of the three values should be 1.0. + Defaults to (0.7, 0.2, 0.1). + random_seed (int): Random seed to use for splitting the dataset. Defaults to 42. + stratify (str | None): Column name to use for stratification. Defaults to None. + save_splits (bool): Whether to save the splits as CSV files. Defaults to False. + """ + annotation_path = None + if isinstance(annotations, (Path, str)): + annotation_path = Path(annotations) + annotations = pd.read_csv(annotations) + + assert isclose(sum(split), 1), "The sum of the split values should be 1.0" + assert all( + 0.0 <= v <= 1.0 for v in split + ), "All split values should be between 0.0 and 1.0" + train_portion, test_portion, val_portion = split + + # Split the dataset + np.random.seed(random_seed) + train_df, test_df = train_test_split( + annotations, + test_size=test_portion + val_portion, + random_state=random_seed, + stratify=annotations[stratify] if stratify else None, + ) + if val_portion > 0.0: + test_df, val_df = train_test_split( + test_df, + test_size=val_portion / (test_portion + val_portion), + random_state=random_seed, + stratify=test_df[stratify] if stratify else None, + ) + else: + val_df = pd.DataFrame() + + # Save the splits + if save_splits or __name__ == "__main__": + if annotation_path is None: + file_stem = "annotations" + if output_path is None: + raise ValueError( + "If the annotations are given as a dataframe, " + "then the output path must be specified " + "to save the datasets." + ) + output_path = Path(output_path) + else: + output_path = Path(output_path) if output_path else annotation_path.parent + file_stem = annotation_path.stem + + if len(train_df) != 0: + train_df.to_csv(output_path / f"{file_stem}_train.csv", index=False) + if len(test_df) != 0: + test_df.to_csv(output_path / f"{file_stem}_test.csv", index=False) + if len(val_df) != 0: + val_df.to_csv(output_path / f"{file_stem}_val.csv", index=False) + + return train_df, test_df, val_df + + +def parse_args(): + parser = argparse.ArgumentParser( + description="Splits the dataset into training, testing, and optionally validation datasets." + ) + parser.add_argument( + "--annotation_path", + default="data/Fall_Simulation_Data/annotations.csv", + type=str, + help="Path to the (complete) annotation CSV file", + ) + parser.add_argument( + "--output_path", + default=None, + type=str, + help="Path to the output directory. " + "The output files will have the same name as the input " + "file, with the suffixes _train, _test, and _val.", + ) + + class TupleAction(argparse.Action): + def __call__(self, parser, namespace, values, option_string=None): + try: + values = tuple(map(float, values.split(","))) + if not all(0.0 <= v <= 1.0 for v in values): + raise ValueError + if not sum(values) == 1.0: + raise ValueError + if not len(values) == 3: + raise ValueError + if not all(v > 0.0 for v in values[:-1]): + raise ValueError + except ValueError: + raise argparse.ArgumentError( + self, + "Invalid tuple of floats. Each value should be between 0.0 and 1.0. " + "And the sum of all values should be 1.0. " + "The tuple should have three values. " + "The values for training and testing should be greater than 0.0.", + ) + setattr(namespace, self.dest, values) + + parser.add_argument( + "--split", + default=(0.7, 0.2, 0.1), + type=str, + action=TupleAction, + help="Tuple of three floats indicating the proportions of the dataset " + "to use for training, testing, and validation (in that order). Each " + "value should be between 0.0 and 1.0, and the sum of the three values " + "should be 1.0.", + ) + + parser.add_argument( + "--random_seed", + default=42, + type=int, + help="Random seed to use for splitting the dataset", + ) + + parser.add_argument( + "--stratify", + default=None, + type=str, + help="Column name to use for stratification", + ) + + return parser.parse_args() + + +if __name__ == "__main__": + args = parse_args() + logger.debug(args) + split_dataset( + annotations=args.annotation_path, + output_path=args.output_path, + split=args.split, + random_seed=args.random_seed, + stratify=args.stratify, + )