Skip to content

What shape should data be? #22

@GlKz13

Description

@GlKz13

Hello! Thank you for your model!
Can you clarify me one more thing?
In your forward method the following is written:

"""Forward function of EvTexture

    Args:
        imgs: Input frames with shape (b, n, c, h, w). b is batch size. n is the number of frames, and c equals 3 (RGB channels).
        voxels_f: forward event voxel grids with shape (b, n-1, Bins, h, w). n-1 is intervals between n frames.
        voxels_b: backward event voxel grids with shape (b, n-1, Bins, h, w).

    Output:
        out_l: output frames with shape (b, n, c, 4h, 4w)
    """

Can you explain me how I should organize my data in, for example, calendar.h5 to feed the model?
I mean in calendar.h5 there are "images" ([H, W]) and "voxels" ([Bins, H, W])
I tried to take 2 images, stacked them ( torch.stack([ image1, image2] )
then I took voxels between these 2 images ( that is one f_voxel and one backward voxel )
then unsqueeze everything to get this one batch( "b" in the forward function )
Finally we get this shapes:
images: [1, 2, 3, H, W]
voxels: [1, 1, 5, H, W]
I tried to use the model: forward( images, voxels_f, voxels_b)

I really got an upscaled image but with awful quality
so, what did I do wrong, I used test data published in this repo. I understand that I probably did smth wrong with shapes or wrongly organized the data
BUT how exactly should I use h5 files with forward method? I want to know how to use "forward" method manually
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions