cremebrule / digital-cousins

Codebase for Automated Creation of Digital Cousins for Robust Policy Learning
https://digital-cousins.github.io
Apache License 2.0
147 stars 16 forks source link

When I run "test_model.py", it reports an error " [Errno 2] No such file or directory: '/data/z/projections/digital-cousins/assets/objects/fridge/snapshot'" #7

Closed Yang-SyZng closed 1 month ago

Yang-SyZng commented 1 month ago

This is a long story, please take some time to read it patiently! !

When I run the test_model.py, the following problem occurs:

for candidate_imgs_fdir in candidate_imgs_fdirs for model in os.listdir(candidate_imgs_fdir) FileNotFoundError: [Errno 2] No such file or directory: '/data/z/projections/digital-cousins/assets/objects/fridge/snapshot'

It shows the error:

No such file or directory: '/data/z/projections/digital-cousins/assets/objects/fridge/snapshot'"

When I manually add "fridge", "wine_fridge", "bottom_cabinet", "display_fridge" these folders, new errors occur:

File "/data/z/projections/digital-cousins/digital_cousins/models/visual_encoder.py", line 69, in get_features assert x.dtype == np.uint8, "Expected input images' dtype to be np.uint8!" AssertionError: Expected input images' dtype to be np.uint8!

Then I modified /digital-cousins/digital_cousins/models/feature_matcher.py, 299,

model_imgs = np.array([np.array(Image.open(model).convert("RGB"), dtype=np.uint8) for model in models], dtype=np.uint8)

,but the new problem still occurs:

File "/data/z/projections/digital-cousins/digital_cousins/models/visual_encoder.py", line 70, in get_features assert x.sha pe[-1] == 3, "Expected input images' final dimension to be channels (RGB) = 3!" AssertionError: Expected input images' final dimension to be channels (RGB) = 3!

Now, I didn't think it's a code problem. When I debugged and output the contents of the "models" variable in "/digital-cousins/digital_cousins/models/feature_matcher.py", I found it was empty.

I think it should be that there is no data in "/assets/objects/fridge/snapshot" that causes this problem. This "assets" folder should not be created manually. Back to the original question,how to solve this problem, or how to generate an "assets" folder!! Thank you!!

Yang-SyZng commented 1 month ago

Sorry everyone, I checked it carefully later,

python -m omnigibson.utils.asset_utils --download_assets --download_og_dataset --accept_license python -m digital_cousins.utils.dataset_utils --download_acdc_assets

The first line was executed, and the second line was ignored by Linux! ! ! Sorry for taking up your reading time! !