eg3d
eg3d copied to clipboard
Question for label
Hello I have a problem when I using the dataset_tool for prepare datasets both from you provided and mine own. There is no label in dataset.json only ["label"] . Can anyone give me some instruction? Thank you!
Hi, the dataset.json file for EG3D is formatted as follows:
{
"labels": [
[path/to/image_name_0, 25-length label],
[path/to/image_name_1, 25-length label],
...
[path/to/image_name_2, 25-length label],
]
}
where every 25-length label is [flattened 4x4 camera pose matrix concatenated to flattened 3x3 intrinsics matrix] corresponding to the image
As such, we expect the only top-level key to be 'label' as you observed. A simple sample to iterate the dataset.json is as follows:
import json
with open('dataset.json') as f:
dataset = json.load(f)
for path, label in dataset['labels']:
# do something with path and label
Hi, the dataset.json file for EG3D is formatted as follows:
{ "labels": [ [path/to/image_name_0, 25-length label], [path/to/image_name_1, 25-length label], ... [path/to/image_name_2, 25-length label], ] }
where every 25-length label is [flattened 4x4 camera pose matrix concatenated to flattened 3x3 intrinsics matrix] corresponding to the image
As such, we expect the only top-level key to be 'label' as you observed. A simple sample to iterate the dataset.json is as follows:
import json with open('dataset.json') as f: dataset = json.load(f) for path, label in dataset['labels']: # do something with path and label
Hello, I really appreciate your reply and I still have questions on generate data.json. When I try to use the dataset_tool to convert the data.json there is no 25-length label. Should I write the code to convert it? And what is the rule of those label to 25-length? Could you give me some instruction thank you.
Hi, the dataset.json file for EG3D is formatted as follows:
{ "labels": [ [path/to/image_name_0, 25-length label], [path/to/image_name_1, 25-length label], ... [path/to/image_name_2, 25-length label], ] }
where every 25-length label is [flattened 4x4 camera pose matrix concatenated to flattened 3x3 intrinsics matrix] corresponding to the image As such, we expect the only top-level key to be 'label' as you observed. A simple sample to iterate the dataset.json is as follows:
import json with open('dataset.json') as f: dataset = json.load(f) for path, label in dataset['labels']: # do something with path and label
Hello, I really appreciate your reply and I still have questions on generate data.json. When I try to use the dataset_tool to convert the data.json there is no 25-length label. Should I write the code to convert it? And what is the rule of those label to 25-length? Could you give me some instruction thank you.
were you able to solve this?