hoops_ai.storage.label_storage

Classes

LabelStorage(path_for_storing[, ...])

Class for encoding and decoding labels.

class hoops_ai.storage.label_storage.LabelStorage(path_for_storing, total_faces=0, total_edges=0)

Bases: object

Class for encoding and decoding labels.

Parameters:
  • path_for_storing (str)

  • total_faces (int)

  • total_edges (int)

EDGE_CADENTITY = 'edge_labels'
EDGE_ENTITY = 'GRAPH_EDGE'
GRAPH_CADENTITY = 'file_label'
GRAPH_ENTITY = 'GRAPH_ENTITY'
NODE_CADENTITY = 'face_labels'
NODE_ENTITY = 'GRAPH_NODE'
load_cadentity(mlTask)
Parameters:

mlTask (str)

Return type:

str

load_entity(mlTask)
Parameters:

mlTask (str)

Return type:

str

load_graph_edges_labels(mlTask)

Loads the label codes and descriptions for each CAD edge.

Parameters:

mlTask (str)

Return type:

Tuple[List[int], List[str]]

load_graph_label(mlTask)

Loads the label code and description for the entire graph.

Parameters:

mlTask (str)

Return type:

Tuple[int, str]

load_graph_nodes_labels(mlTask)

Loads the label codes and descriptions for each CAD face.

Parameters:

mlTask (str)

Return type:

Tuple[List[int], List[str]]

load_sparse_graph_edge_label(mlTask)

Loads sparse edge label data.

Parameters:

mlTask (str)

Return type:

Tuple[List[int], List[int], List[str] | None]

save_graph_edge_label(mlTask, edgeLabels, edgeLabelDescriptions)

Saves the label codes and descriptions for each CAD edge.

Parameters:
save_graph_label(mlTask, graphLabel, graphLabelDescription)

Saves the label code and description for the entire graph.

Parameters:
  • mlTask (str)

  • graphLabel (int)

  • graphLabelDescription (str)

save_graph_node_label(mlTask, faceLabels, faceLabelDescriptions)

Saves the label codes and descriptions for each CAD face.

Parameters:
save_sparse_graph_edge_label(mlTask, edgeIndices, edgeLabels, defaultLabel=0, edgeLabelDescriptions=None)

Saves sparse edge label codes while assigning a default label to all other edges.

Parameters:
save_sparse_graph_node_label(mlTask, faceIndices, faceLabels, defaultLabel=0, faceLabelDescriptions=None)

Saves sparse face label codes and descriptions while assigning a default label to all other faces.

Parameters: