Model Interface¶
openlithohub.models.base
¶
Abstract base class for lithography optimization models.
PredictionResult
dataclass
¶
LithographyModel
¶
Bases: ABC
Abstract interface for lithography optimization models.
Any model (heuristic OPC, U-Net, diffusion-based ILT, curvyILT) can join the evaluation pipeline by implementing predict().
Source code in src/openlithohub/models/base.py
name
abstractmethod
property
¶
Human-readable model name for leaderboard display.
supports_curvilinear
abstractmethod
property
¶
Whether this model produces curvilinear (non-Manhattan) output.
predict(design, **kwargs)
abstractmethod
¶
Run model inference on a design layout tensor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
design
|
Tensor
|
Input design tensor of shape (H, W) or (B, C, H, W). |
required |
**kwargs
|
Any
|
Model-specific parameters (process node, dose, etc.) |
{}
|
Returns:
| Type | Description |
|---|---|
PredictionResult
|
PredictionResult with the optimized mask and optional contour. |
Source code in src/openlithohub/models/base.py
setup()
¶
openlithohub.models.registry
¶
Model registry — discover and instantiate lithography models.
ModelRegistry
¶
Registry for discovering and instantiating lithography models.
Source code in src/openlithohub/models/registry.py
register(model_cls)
¶
Register a model class. Can be used as a decorator.
Source code in src/openlithohub/models/registry.py
get(name, **kwargs)
¶
Instantiate a registered model by name.