Skip to content

[Visualization/Representation] Different values in part_boxes: datav1.py vs data_snv1.py #21

@GregorKobsik

Description

@GregorKobsik

When loading an object with the provided dataloaders I get different number of values for part_boxes.

Using PartGraphShapesDataset from datav1.py the Tensor has 10 values, when using PartGraphShapesDataset from data_snv1.py the Tensor has 12 values.

It seems like the visualization script vis_utils.py expects the boxes to have 12 values.

def draw_box(ax, p, color, rot=None):
center = p[0: 3]
lengths = p[3: 6]
dir_1 = p[6: 9]
dir_2 = p[9:]

So, what do the 10 values represent and how can I convert them to match the visualization (e.g. vis_pc.ipynb) for the output?

Minimal Code Examples:

from datav1 import PartGraphShapesDataset

dataset = PartGraphShapesDataset('../data/partnetdata/Chair_dgeo', '../data/part_trees/Chair_all_no_other_less_than_10_parts-train', "cpu", 1)

data_item = next(iter(dataset))
obj = data_item[1]

part_boxes, part_geos, edges, part_ids, part_sems = obj.graph(leafs_only=True)

print(part_boxes[0].shape)
print(part_boxes[0])
from data_snv1 import PartGraphShapesDataset, Tree

data_features = ['object', 'name']
dataset = PartGraphShapesDataset('../data/partnetdata/Chair_dhier', 'test.txt', data_features, Tree)

data_item = next(iter(dataset))
obj = data_item[0]

part_boxes, part_geos, edges, part_ids, part_sems = obj.graph(leafs_only=True)

print(part_boxes[0].shape)
print(part_boxes[0])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions