Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame concatenation methods are different between gradio demo and fast_captioner_lmdeploy.py? #38

Open
Liam-lyr opened this issue Aug 19, 2024 · 0 comments

Comments

@Liam-lyr
Copy link

Hi, thanks for the great work!

I'm interested in the Fast Captioning pipeline and I found there if a difference between the frame concatenation methods used in captioner/fast_captioner_lmdeploy.py and captioner/app.py.

In captioner/fast_captioner_lmdeploy.py, you use 30 frames per image to form a 5x6 grid and feed it to the pipeline (https://github.com/ShareGPT4Omni/ShareGPT4Video/blob/88426fd4a8386f3009368d424d5972881cdde311/captioner/fast_captioner_lmdeploy.py#L93C1-L97C84):

    img_grid_w, img_grid_h = 5, 6  # Grid dimensions, defaultly 30 images per video
    img_h, img_w = 600, 800  # Desired height and width

    # Create the dataset
    dataset = ImageGridDataset(args.img_path, img_grid_w, img_grid_h, img_h, img_w)

However in captioner/app.py, you concat the frames in a list (as described in the original paper) (the following snippet and https://github.com/ShareGPT4Omni/ShareGPT4Video/blob/88426fd4a8386f3009368d424d5972881cdde311/captioner/app.py#L155C1-L201C21):

    imgs = load_quota_video(video_path)
    img = img_process(imgs)

Can you please explain why? Thanks a lot.

@Liam-lyr Liam-lyr changed the title Frame concatenation methods are different between radio demo and fast_captioner_lmdeploy.py? Frame concatenation methods are different between gradio demo and fast_captioner_lmdeploy.py? Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant