| { |
| "node_feature_schema": { |
| "widget_class": "categorical -> nn.Embedding(num_classes+1[MASK], CLASS_EMBED_DIM), trainable", |
| "center_x": "continuous, normalized [0,1]", |
| "center_y": "continuous, normalized [0,1]", |
| "width": "continuous, normalized [0,1]", |
| "height": "continuous, normalized [0,1]", |
| "area": "continuous, normalized [0,1]", |
| "aspect_ratio": "continuous, width/height", |
| "confidence": "continuous, YOLO detection confidence [0,1]" |
| }, |
| "node_feature_dimension": { |
| "continuous_features_cached": 7, |
| "class_embedding_dim": 32, |
| "raw_concat_dimension": 39, |
| "gat_input_dimension_after_projection": 64 |
| }, |
| "edge_feature_schema": [ |
| "norm_dx", |
| "norm_dy", |
| "distance", |
| "norm_angle", |
| "iou", |
| "horizontal_alignment", |
| "vertical_alignment", |
| "containment_flag", |
| "overlap_flag", |
| "reading_order_flag", |
| "edge_type_id_normalized" |
| ], |
| "edge_feature_dimension": 11, |
| "edge_type_mapping": { |
| "LEFT_OF": 0, |
| "RIGHT_OF": 1, |
| "ABOVE": 2, |
| "BELOW": 3, |
| "SAME_ROW": 4, |
| "SAME_COLUMN": 5, |
| "CONTAINS": 6, |
| "INSIDE": 7, |
| "OVERLAPS": 8, |
| "NEAREST_NEIGHBOR": 9, |
| "READING_ORDER": 10 |
| }, |
| "widget_class_mapping": { |
| "Button": 0, |
| "Text": 1, |
| "Image": 2, |
| "TextInput": 3, |
| "Checkbox": 4, |
| "RadioButton": 5, |
| "Switch": 6, |
| "Slider": 7, |
| "ProgressBar": 8, |
| "Toolbar": 9, |
| "NavigationBar": 10, |
| "RecyclerView": 11, |
| "ListView": 12, |
| "Card": 13, |
| "Container": 14, |
| "WebView": 15, |
| "FloatingActionButton": 16, |
| "Icon": 17, |
| "Dropdown": 18, |
| "Other": 19 |
| }, |
| "mask_class_id": 20, |
| "normalization_rules": { |
| "center_x_y": "divided by image width/height respectively -> [0,1]", |
| "width_height": "divided by image width/height respectively -> [0,1]", |
| "area": "normalized width * normalized height", |
| "aspect_ratio": "normalized width / normalized height", |
| "confidence": "raw YOLO confidence, already in [0,1]", |
| "edge_dx_dy": "difference of normalized centers (direction i -> j)", |
| "edge_distance": "euclidean distance of normalized centers", |
| "edge_angle": "atan2(dy, dx) / pi, in [-1, 1]" |
| }, |
| "graph_construction_thresholds": { |
| "align_tolerance": 0.02, |
| "containment_threshold": 0.9, |
| "overlap_iou_threshold": 0.1, |
| "nearest_neighbors_k": 4, |
| "distance_threshold": 0.3, |
| "add_self_loops": true, |
| "connect_components": true, |
| "empty_detection_strategy": "skip" |
| }, |
| "yolo_confidence_threshold": 0.25, |
| "yolo_iou_threshold": 0.45, |
| "yolo_img_size": 640, |
| "gat_architecture": { |
| "input_dim": 64, |
| "hidden_dim": 128, |
| "num_layers": 3, |
| "heads": 4, |
| "dropout": 0.1, |
| "edge_dim": 11 |
| }, |
| "gat_output_dimension": 256 |
| } |