Porównaj commity

...

2 Commity

Autor SHA1 Wiadomość Data
Zhen Liu 2b7a908cf8
Update save_meta.py 2023-04-20 11:07:22 +02:00
Zhen Liu e3ace6b510
Update README.md 2023-04-20 11:06:02 +02:00
2 zmienionych plików z 11 dodań i 2 usunięć

Wyświetl plik

@ -109,7 +109,16 @@ python fit_dmtets.py --config $DMTET_CONFIG --meta-path $META_PATH --out-dir $DM
where `split_size` is set to any large number greater than the dataset size. In case of batch fitting with multiple jobs, change `split_size` to a suitable number and assign a different `index` for different jobs. Tune the resolutions in the 1st and 2nd pass fitting in the config file if necessary. `$META_PATH` is the json file created to store the list of meshes paths.
Create a meta file of all dmtet grid file locations for diffusion model training:
Now convert the DMTet dataset (stored as python dicts) into a dataset of 3D cubic grids:
```
cd ../data/
python tets_to_3dgrid.py --resolution $RESOLUTION --root $DMTET_DICT_FOLDER --source $SOURCE_FOLDER --target grid --index 0
```
in which we assume the DMTet dict dataset is stored in `$DMTET_DICT_FOLDER/$SOURCE_FOLDER` and we will save the resulted cubic grid dataset in `$DMTET_DICT_FOLDER/grid`.
Create a meta file of all dmtet 3D cubic grid file locations for diffusion model training:
```
cd ../metadata/

Wyświetl plik

@ -8,7 +8,7 @@ if __name__ == "__main__":
parser.add_argument('--json_path', type=str)
args = parser.parse_args()
fpath_list = sorted([os.path.join(args.data_path, fname) for fname in os.listdir(root) if fname.endswith('.pt')])
fpath_list = sorted([os.path.join(args.data_path, fname) for fname in os.listdir(args.data_path) if fname.endswith('.pt')])
os.makedirs(args.json_path, exist_ok=True)
json.dump(fpath_list, open(args.json_path, 'w'))