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

Data Preprocessing Details #25

Open
amogh-tiwari opened this issue Jan 15, 2025 · 5 comments
Open

Data Preprocessing Details #25

amogh-tiwari opened this issue Jan 15, 2025 · 5 comments

Comments

@amogh-tiwari
Copy link

amogh-tiwari commented Jan 15, 2025

Hi!

Thank you for your interesting work, and making the codebase public.

I had a query related to the preprocessing. Can you please point to the script used for preprocessing the data and obtaining the grabnet_.npz files. I am particularly interested in how the BPS was computed. I went through #7 already, but couldn't find the BPS computation information there or in any other script in the repo.

It would be really helpful to have the related script as a reference.

Best Regards,
Amogh

@cutepiggy123
Copy link

hi do you encounter this when running test.py
Traceback (most recent call last):
File "grabnet/tests/test.py", line 143, in
grabnet = Trainer(cfg=cfg, inference=True)
File "/home/thanh/GrabNet/./grabnet/train/trainer.py", line 75, in init
self.load_data(cfg, inference)
File "/home/thanh/GrabNet/./grabnet/train/trainer.py", line 157, in load_data
ds_test = LoadData(dataset_dir=cfg.dataset_dir, ds_name=ds_name)
File "/home/thanh/GrabNet/./grabnet/data/dataloader.py", line 40, in init
self.ds = self.np2torch(os.path.join(self.ds_path,'grabnet%s.npz'%ds_name))
File "/home/thanh/GrabNet/./grabnet/data/dataloader.py", line 71, in _np2torch
data = np.load(ds_path, allow_pickle=True)
File "/home/thanh/miniconda3/envs/grab/lib/python3.8/site-packages/numpy/lib/npyio.py", line 405, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'GrabNet/grab/test/grabnet_test.npz'

@amogh-tiwari
Copy link
Author

hi do you encounter this when running test.py Traceback (most recent call last): File "grabnet/tests/test.py", line 143, in grabnet = Trainer(cfg=cfg, inference=True) File "/home/thanh/GrabNet/./grabnet/train/trainer.py", line 75, in init self.load_data(cfg, inference) File "/home/thanh/GrabNet/./grabnet/train/trainer.py", line 157, in load_data ds_test = LoadData(dataset_dir=cfg.dataset_dir, ds_name=ds_name) File "/home/thanh/GrabNet/./grabnet/data/dataloader.py", line 40, in init self.ds = self.np2torch(os.path.join(self.ds_path,'grabnet%s.npz'%ds_name)) File "/home/thanh/GrabNet/./grabnet/data/dataloader.py", line 71, in _np2torch data = np.load(ds_path, allow_pickle=True) File "/home/thanh/miniconda3/envs/grab/lib/python3.8/site-packages/numpy/lib/npyio.py", line 405, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'GrabNet/grab/test/grabnet_test.npz'

No, I haven't come across this issue. But from the error message, it seems to be something related to the file path. Can you check if the file actually exists at GrabNet/grab/test/grabnet_test.npz?

@amogh-tiwari
Copy link
Author

Hi!

Thank you for your interesting work, and making the codebase public.

I had a query related to the preprocessing. Can you please point to the script used for preprocessing the data and obtaining the grabnet_.npz files. I am particularly interested in how the BPS was computed. I went through #7 already, but couldn't find the BPS computation information there or in any other script in the repo.

It would be really helpful to have the related script as a reference.

Best Regards, Amogh

@otaheri: On a related note, can you also tell me what preprocessing is done for objects having lesser number of vertices than the desired number of vertices. For example, I run the grab_preprocessing.py script with n_sample_verts=1024. And I come across a mesh with lesser number of vertices (say 400). How do you preprocess this object? I couldn't figure it out from the code.

Thanks in Advance,
Amogh

@cutepiggy123
Copy link

Hi thank you for your reply! Can I ask when you unzip the zip files. do you have the obj_info.npy inside data folder. I am missing that file and can not find that
image

@amogh-tiwari
Copy link
Author

Hi thank you for your reply! Can I ask when you unzip the zip files. do you have the obj_info.npy inside data folder. I am missing that file and can not find that image

No. Even I had this problem. There is an obj_info.npy file under the grab folder which I think is the same file, but I am not sure. Regardless, I noticed in the code that while obj_info.npy was being loaded, it was never used. So, I just commented out the line where it was being loaded and ran the code.

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