williamfzc / stagesepx

detect stages in video automatically
MIT License
434 stars 125 forks source link

assert ret AssertionError #5

Closed ryzn0518 closed 5 years ago

ryzn0518 commented 5 years ago

Traceback (most recent call last): File "test01.py", line 10, in data_home = res.pick_and_save(stable, 3) File "/python/lib/python3.6/site-packages/stagesepx/cutter.py", line 186, in pick_and_save each_frame = toolbox.get_frame(cap, each_frame_id - 1) File "/python/lib/python3.6/site-packages/stagesepx/toolbox.py", line 48, in get_frame assert ret AssertionError

williamfzc commented 5 years ago
ryzn0518 commented 5 years ago

2019-07-23 17:38:15.044 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 189 & 191: 0.8626925533155252
2019-07-23 17:38:15.181 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 191 & 193: 0.9619484820205888
2019-07-23 17:38:15.343 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 193 & 195: 0.8392827889599708
2019-07-23 17:38:15.489 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 195 & 197: 0.9829648258415573
2019-07-23 17:38:15.523 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 197 & 199: 0.9848047191657933
2019-07-23 17:38:15.565 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 199 & 201: 0.9543521718146377
2019-07-23 17:38:15.605 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 201 & 203: 0.9810263772769572
2019-07-23 17:38:15.648 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 203 & 205: 0.9300802784832954
2019-07-23 17:38:15.698 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 205 & 207: 0.9686640701872982
2019-07-23 17:38:15.752 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 207 & 209: 0.9882810718378968
2019-07-23 17:38:15.814 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 209 & 211: 0.9708240183829522
2019-07-23 17:38:15.877 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 211 & 213: 0.9423761202071347
2019-07-23 17:38:15.957 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 213 & 215: 0.9495719608660221
2019-07-23 17:38:16.023 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 215 & 217: 0.9099041400714621
2019-07-23 17:38:16.089 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 217 & 219: 0.854118294744502
2019-07-23 17:38:16.165 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 219 & 221: 0.8927983414052197
2019-07-23 17:38:16.242 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 221 & 223: 0.8534509879272507
2019-07-23 17:38:16.313 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 223 & 225: 0.9692239488567366
2019-07-23 17:38:16.390 | DEBUG    | stagesepx.cutter:convert_video_into_ssim_list:227 - ssim between 225 & 227: 0.933119885503581
2019-07-23 17:38:16.469 | INFO     | stagesepx.cutter:cut:250 - cut finished: test.mp4
2019-07-23 17:38:16.470 | DEBUG    | stagesepx.cutter:get_unstable_range:137 - unstable range of [test.mp4]: [<VideoCutRange [105-117] ssim=0.7540685389818855>, <VideoCutRange [119-141] ssim=0.8572413249488022>, <VideoCutRange [143-171] ssim=0.822696987019726>, <VideoCutRange [177-181] ssim=0.8907818735844267>, <VideoCutRange [183-185] ssim=0.9360519950921669>, <VideoCutRange [189-191] ssim=0.8626925533155252>, <VideoCutRange [193-195] ssim=0.8392827889599708>, <VideoCutRange [203-205] ssim=0.9300802784832954>, <VideoCutRange [211-223] ssim=0.8726822524459956>]
2019-07-23 17:38:16.470 | DEBUG    | stagesepx.cutter:get_stable_range:158 - stable range of [test.mp4]: [<VideoCutRange [1-105] ssim=0>, <VideoCutRange [223-227] ssim=0>, <VideoCutRange [117-119] ssim=0>, <VideoCutRange [141-143] ssim=0>, <VideoCutRange [171-177] ssim=0>, <VideoCutRange [181-183] ssim=0>, <VideoCutRange [185-189] ssim=0>, <VideoCutRange [191-193] ssim=0>, <VideoCutRange [195-203] ssim=0>, <VideoCutRange [205-211] ssim=0>]
2019-07-23 17:38:16.470 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [35, 70, 105] in range <VideoCutRange [1-105] ssim=0>
2019-07-23 17:38:16.470 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [117, 118, 119] in range <VideoCutRange [117-119] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [141, 142, 143] in range <VideoCutRange [141-143] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [173, 175, 177] in range <VideoCutRange [171-177] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [181, 182, 183] in range <VideoCutRange [181-183] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [186, 187, 189] in range <VideoCutRange [185-189] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [191, 192, 193] in range <VideoCutRange [191-193] ssim=0>
2019-07-23 17:38:16.471 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [197, 200, 203] in range <VideoCutRange [195-203] ssim=0>
2019-07-23 17:38:16.472 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [207, 209, 211] in range <VideoCutRange [205-211] ssim=0>
2019-07-23 17:38:16.472 | INFO     | stagesepx.cutter:pick_and_save:170 - pick [224, 225, 227] in range <VideoCutRange [223-227] ssim=0>
2019-07-23 17:38:16.565 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [35] saved to 2019072317381613/0/85fca535-bab1-4bfd-8d63-e1febeb473b0.png
2019-07-23 17:38:16.621 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [70] saved to 2019072317381613/0/d88e99b7-6a37-443f-b7df-19715593f2e8.png
2019-07-23 17:38:16.687 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [105] saved to 2019072317381613/0/c940adc3-5558-4202-a7ee-d1507f42317b.png
2019-07-23 17:38:16.898 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [117] saved to 2019072317381613/1/d67dc6bc-fb84-4b2d-8d52-152f632de67d.png
2019-07-23 17:38:17.074 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [118] saved to 2019072317381613/1/8817ecdf-8331-4efe-8097-aacc4cb0211b.png
2019-07-23 17:38:17.263 | DEBUG    | stagesepx.cutter:pick_and_save:190 - frame [119] saved to 2019072317381613/1/95074b68-4b82-4458-a1b5-f96a7fb5a858.png
Traceback (most recent call last):
  File "test01.py", line 10, in <module>
    data_home = res.pick_and_save(stable, 3)
  File "/python/lib/python3.6/site-packages/stagesepx/cutter.py", line 186, in pick_and_save
    each_frame = toolbox.get_frame(cap, each_frame_id - 1)
  File "/python/lib/python3.6/site-packages/stagesepx/toolbox.py", line 48, in get_frame
    assert ret
AssertionError```
williamfzc commented 5 years ago
williamfzc commented 5 years ago

already fixed i think