Full Model Description

The full model description is available in the main repository:

GreenMap/hatch-finder-3.5m

Input -> output: RGB image + mask -> heatmap (torch matrix)

Training

Validation Metrics

Metric Value
Validation loss 0.073
BCE loss 0.01893
Dice loss 0.06637

Architecture

  • Encoders: Separate residual CNN encoders for the drawing and reference, with channel widths [64, 128, 128, 256].
  • Transformers: Four Transformer blocks at the deepest stage of each encoder, with 8 attention heads and an MLP ratio of 8.
  • Feature matching: Multi-scale comparison of drawing and reference features.
  • Decoder: Segmentation decoder with skip connections and reference-conditioned FiLM modulation.
  • Pixel correlation: Rotation-aware pixel similarity module that refines segmentation predictions using the hatch reference.
  • Parameters: ~23.3M

Architecture (yaml)

model:
  pixel_correlation:
      enabled: true
      hidden_channels: 32
      downsample: 2
  drawing_channels: [64, 128, 128, 256]
  hatch_channels: [64, 128, 128, 256]
  hatch_pool_sizes: [2, 4, 6, 6]

  match_dims: [64, 128, 256, 256]
  match_feature_dims: [16, 24, 32, 32]
  match_gate_initial_values: [0.3, 0.3, 0.3, 1.0]
  matcher_channels: [256, 64]

  drawing_residual_blocks: [1, 1, 1, 1]
  hatch_residual_blocks: [1, 1, 1, 1]

  group_norm_groups_drawings: 8
  group_norm_groups_hatchings: 8

  kernel_size: 3
  downsample_stride: 2

  transformers:
  - level: 3
    num_heads: 8
    num_blocks: 4
    downsample: 2
    mlp_ratio: 8.0
    dropout: 0.0
    initial_gate: 0.02
  
  hatch_transformers:
  - level: 3
    num_heads: 8
    num_blocks: 4
    downsample: 2
    mlp_ratio: 8.0
    dropout: 0.0
    initial_gate: 0.02
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support