-
Notifications
You must be signed in to change notification settings - Fork 364
Open
Description
I'm trying to train the PVCNN model using .pkl files (preprocessed from S3DIS data) and later perform semantic segmentation on .ply point clouds captured by a ZED 2i camera. However, the original prepare_data.py script fails, and the training pipeline expects .npy or .txt formats rather than .pkl.
What I Did:
Preprocessed .pkl Available:
I confirmed the following structure in my data:
with open('path/to/data.pkl', 'rb') as f:
data = pickle.load(f)
# Sample output:
# coord: (N, 3)
# color: (N, 3)
# semantic_gt: (N, 1)
# instance_gt: (N, 1)
# normal: (N, 3)Running prepare_data.py gave:
FileNotFoundError: .../Area_1/office_7/xyzrgb.npyBecause .npy files are expected, but my data is already processed and in .pkl.
Accidentally shadowed torch module:
I had a local file named torch.py, which led to:
ModuleNotFoundError: No module named 'torch.utils'; 'torch' is not a packageFixed by renaming the file and clearing __pycache__.
Next:
I tried importing a s3dis_pkl_dataset class (not in repo), and got:
ModuleNotFoundError: No module named 's3dis_pkl_dataset'Solution I Built:
Created a custom dataset class:
class S3DISPKLDataset(Dataset):
...
def __getitem__(self, idx):
with open(self.data_paths[idx], 'rb') as f:
data = pickle.load(f)
...
return {
'coord': coord,
'color': color,
'semantic_gt': semantic_gt
}This allowed me to correctly load .pkl files and test DataLoader successfully.
Request for Maintainers:
- Provide built-in support or documentation for using
.pklfiles as input. - Consider refactoring
prepare_data.pyto allow choosing between.txt,.npy, or.pkl. - Add a safeguard in README against naming files
torch.py(common mistake for new users). - Confirm best practices for plugging in external
.plyfiles (e.g. ZED 2i output) for inference.
Environment
- OS: Ubuntu 22.04
- Python: 3.13 (Miniconda)
- Torch: 2.7.1 (CUDA 12.6)
- PVCNN repo: latest from GitHub
Metadata
Metadata
Assignees
Labels
No labels