RifleZhang / LLaVA-Hound-DPO

121 stars 18 forks source link

Which annotation to decide "Scene-xxx" for ActivityNet data #6

Closed jpWang closed 6 months ago

jpWang commented 6 months ago

Hi, thanks for your great work~ I just want to ask that which annotation file do you use to split "Scene-xxx" for ActivityNet data?

guilk commented 6 months ago

Hi, thanks for your interest in our work.

We use scenedetect to detect shot changes in ActivityNet videos. A demo code is as follows:

from scenedetect import detect, AdaptiveDetector, split_video_ffmpeg

scene_list = detect(video_path, AdaptiveDetector())
filter_list = []
for scene in scene_list:
    start_time, end_time = scene[0].get_timecode(), scene[1].get_timecode()
    float_start, float_end = get_seconds(start_time), get_seconds(end_time)
    filter_list.append(scene)
    if len(filter_list) > 0:
        split_video_ffmpeg(video_path, filter_list)