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

shape issues #260

Open
ZubairKhan001 opened this issue Jan 8, 2025 · 8 comments
Open

shape issues #260

ZubairKhan001 opened this issue Jan 8, 2025 · 8 comments

Comments

@ZubairKhan001
Copy link

File "/opt/OpenGait/opengait/data/transform.py", line 71, in call
return (x - self.mean) / self.std
ValueError: operands could not be broadcast together with shapes (30,64,64) (1,3,1,1)

@chuanfushen
Copy link
Collaborator

It looks like you want to apply BaseRgbTransform on your input. Then make sure your input is RGB images, which contains 3 channels for each pixel.

@ZubairKhan001
Copy link
Author

ZubairKhan001 commented Jan 8, 2025 via email

@ZubairKhan001
Copy link
Author

ZubairKhan001 commented Jan 8, 2025 via email

@ZubairKhan001
Copy link
Author

ZubairKhan001 commented Jan 8, 2025 via email

@chuanfushen
Copy link
Collaborator

you can follow the structure of SUSTech1K dataset, putting all of your sequences within separated pkl.
https://github.com/ShiqiYu/OpenGait/tree/master/datasets/SUSTech1K

Then be noticed to modify the corresponding data_in_use as:

data_in_use: [false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false]

@ZubairKhan001
Copy link
Author

ZubairKhan001 commented Jan 10, 2025 via email

@chuanfushen
Copy link
Collaborator

BigGait requires two inputs, one is rgb modality, another is ratios.

sils = ipts[0] # input_images; shape: [n,s,c,h,w];
ratios = ipts[1] # real_image_ratios shape: [n,s,ratio]; ratio: w/h, e.g. 112/224=0.5;

Follow BigGait configuration.yaml

data_in_use: [True, True] # images / real_ratios

Try to include ratios within input as well.

@zjq1839
Copy link

zjq1839 commented Feb 7, 2025

BigGait requires two inputs, one is rgb modality, another is ratios.

OpenGait/opengait/modeling/models/BigGait.py

Lines 214 to 215 in 086f9f0

sils = ipts[0] # input_images; shape: [n,s,c,h,w];
ratios = ipts[1] # real_image_ratios shape: [n,s,ratio]; ratio: w/h, e.g. 112/224=0.5;
Follow BigGait configuration.yaml

OpenGait/configs/biggait/BigGait_CCPG.yaml

Line 6 in 086f9f0

data_in_use: [True, True] # images / real_ratios

Try to include ratios within input as well.

Hello there, when I tried to try to organize my datasets according to the CCPG format, I found that the model actually loaded the 'subject-seqtype-view-aligned-sils.pkl', which is not the rgb one, is this correct?

Image

I forced the model to load rgb images by setting 'data_in_use:[fasle,true,true,false], sils = ipts[1], ratios = ipts[0]', then I encounterd with a new error
[rank0]: File "OpenGait/opengait/utils/common.py", line 106, in ts2var
[rank0]: return autograd.Variable(x, **kwargs).cuda()
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: RuntimeError: Only Tensors of floating point and complex dtype can require gradients

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

3 participants