rasmushaugaard / surfemb

SurfEmb (CVPR 2022)
https://surfemb.github.io/
MIT License
77 stars 17 forks source link

Some problems encountered when training tless #12

Closed transcend-lzy closed 2 years ago

transcend-lzy commented 2 years ago

I downloaded the tless on bop and put it under data/bop/tless, the code can load the cad models , i use python -m surfemb.scripts.train tless --gpus 0 to run, but it runs to After trainer.fit, the following error will occur: TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'trimesh.caching.TrackedArray'> Sorry, am I setting it wrong? image

transcend-lzy commented 2 years ago

There should be a problem with the instance obtained by the dataset, but I have not changed the code, I hope to get your help, thank you

transcend-lzy commented 2 years ago

It maybe environment problems.I had encountered this problem.conda env create -f environment.yml maybe fix it.I forget how I solved this problem

Thank, you! I have used conda env create -f environment.yml . Maybe some auto-installed version is incorrect? Can you show me the difference between our environments? It is mine image

hengseuer commented 2 years ago

https://github.com/rasmushaugaard/surfemb/blob/53e1852433a3b2b84fedc7a3a01674fe1b6189cc/surfemb/data/pose_auxs.py#L57 inst['surface_samples'] = np.array(mesh.sample(self.n_samples)).astype(np.float32)

LeroyChou commented 2 years ago

https://github.com/rasmushaugaard/surfemb/blob/53e1852433a3b2b84fedc7a3a01674fe1b6189cc/surfemb/data/pose_auxs.py#L57

inst['surface_samples'] = np.array(mesh.sample(self.n_samples)).astype(np.float32)

Wow, This works! Thank you.

transcend-lzy commented 2 years ago

np.array(mesh.sample(self.n_samples)).astype(np.float32) Thank you!

transcend-lzy commented 2 years ago

https://github.com/rasmushaugaard/surfemb/blob/53e1852433a3b2b84fedc7a3a01674fe1b6189cc/surfemb/data/pose_auxs.py#L57

inst['surface_samples'] = np.array(mesh.sample(self.n_samples)).astype(np.float32)

Thank you!

domef commented 1 year ago

Why is this fix not commited on master branch?