Skip to content

How does converting the .xyz file to a .dat file work ? #111

@Michael-H1302

Description

@Michael-H1302

If I have understood everything correctly the generate_data.py file generates the .xyz files in the rendering folder. But these files can't be used for training yet. They need to be converted to .dat files.
In another issue I read that the .dat files are just a binary wrapper for the .xyz files and you should use pickle to create them. But if I use pickle as following:

import pickle
import numpy as np

content = []

with open('00.xyz', 'r') as f:
    for line in f.readlines():
            content.append(line.split(' '))

with open('00.dat', 'wb') as f:
        pickle.dump(content, f)

the created .dat file looks different.
If you open a .dat file from the ShapeNet training data provided from the developers via google drive you see that every .dat file starts with

cnumpy.core.multiarray
_reconstruct

but my generated .dat file doesn't.

A snippet of a code which converts the .xyz files into .dat files that are usable for training would be great.
Does anyone know what I am doing wrong ?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions