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

cannot reshape array of size 230400 into shape (64,64,newaxis) #5

Closed
as472780551 opened this issue Dec 3, 2018 · 3 comments
Closed

Comments

@as472780551
Copy link

How this issue to solve ? Can you help me ?

@AbnerHqC
Copy link
Owner

AbnerHqC commented Dec 3, 2018

Could you be more specific? Post the error message?

@as472780551
Copy link
Author

Initialzing...
Initializing data source...
Loading training data...
Traceback (most recent call last):
File "train.py", line 18, in
m = initialization(conf, train=opt.cache)[0]
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/initialization.py", line 57, in initialization
train_source, test_source = initialize_data(config, train, test)
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/initialization.py", line 18, in initialize_data
train_source.load_all_data()
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 45, in load_all_data
self.load_data(i)
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 48, in load_data
return self.getitem(index)
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 62, in getitem
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 62, in
data = [self.loader(_path) for _path in self.seq_dir[index]]
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 52, in loader
path)[:, :, self.cut_padding:-self.cut_padding].astype(
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 79, in img2xarray
for _img_path in imgs
File "/media/zrj/新加卷/ubuntu18.04/gaitset/GaitSet-master/model/utils/data_set.py", line 80, in
if osp.isfile(osp.join(flie_path, _img_path))]
File "/home/zrj/.conda/envs/pytorch35/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 279, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/zrj/.conda/envs/pytorch35/lib/python3.5/site-packages/numpy/core/fromnumeric.py", line 51, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: cannot reshape array of size 230400 into shape (64,64,newaxis)
@AbnerHqC

@AbnerHqC
Copy link
Owner

AbnerHqC commented Dec 3, 2018

The original silhouette should first be cut, aligned and resized into 64*64.

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

2 participants