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

Using my own obj files for training #153

Open
Sawaiz8 opened this issue Sep 28, 2023 · 2 comments
Open

Using my own obj files for training #153

Sawaiz8 opened this issue Sep 28, 2023 · 2 comments

Comments

@Sawaiz8
Copy link

Sawaiz8 commented Sep 28, 2023

I have been trying to use my own dataset with meshcnn but I am not able to identity how I can make your code to accept my dataset.
I created a new dataset in the dataset folder it has the same directory structure as the shrec16 dataset but when I run the code after changing the dataroot directory to datasets/anchor_obj in train.sh file, I get the following error:

File "/home/sawaiz/Documents/Lab/Projects/MeshCNN/MeshCNN-master/data/init.py", line 12, in CreateDataset
dataset = ClassificationData(opt)
File "/home/sawaiz/Documents/Lab/Projects/MeshCNN/MeshCNN-master/data/classification_data.py", line 19, in init
self.get_mean_std()
File "/home/sawaiz/Documents/Lab/Projects/MeshCNN/MeshCNN-master/data/base_dataset.py", line 32, in get_mean_std
for i, data in enumerate(self):
File "/home/sawaiz/Documents/Lab/Projects/MeshCNN/MeshCNN-master/data/classification_data.py", line 34, in getitem
edge_features = pad(edge_features, self.opt.ninput_edges)
File "/home/sawaiz/Documents/Lab/Projects/MeshCNN/MeshCNN-master/util/util.py", line 22, in pad
return np.pad(input_arr, pad_width=npad, mode='constant', constant_values=val)
File "/home/sawaiz/.local/lib/python3.10/site-packages/numpy/lib/arraypad.py", line 748, in pad
pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
File "/home/sawaiz/.local/lib/python3.10/site-packages/numpy/lib/arraypad.py", line 518, in _as_pairs
raise ValueError("index can't contain negative values")
ValueError: index can't contain negative values

I feel I have to process my data in a certain way but I am not sure. Can you please clarify how I can do that?
My dataset is a face dataset. I used mediapipe facial landmarker to get the facial landmarks of a face in 3d and then convert the point cloud into a mesh using open3d library. I can access the obj files and see the objects. The number of vertices and faces are variable in all these files.

@yy030425
Copy link

Hi! I get the same error.And I processed my data,like simplifying to the same faces,but it still didn't work.Were you able to solve the issue?

@Sawaiz8
Copy link
Author

Sawaiz8 commented Dec 13, 2024

Nope. I gave up

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