mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 13:16:32 +00:00
Add detailed file index and enhance skill documentation for autopilot, decompose, deploy, plan, and research skills. Introduce tests-only mode in decompose skill, clarify required files for deploy and plan skills, and improve prerequisite checks across skills for better user guidance and workflow efficiency.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
# Module: inference_engine
|
||||
|
||||
## Purpose
|
||||
|
||||
Abstract base class defining the interface that all inference engine implementations must follow.
|
||||
|
||||
## Public Interface
|
||||
|
||||
### Class: InferenceEngine
|
||||
|
||||
#### Fields
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `batch_size` | int | Number of images per inference batch |
|
||||
|
||||
#### Methods
|
||||
|
||||
| Method | Signature | Description |
|
||||
|--------|-----------|-------------|
|
||||
| `__init__` | `(bytes model_bytes, int batch_size=1, **kwargs)` | Stores batch_size |
|
||||
| `get_input_shape` | `() -> tuple` | Returns (height, width) of model input. Abstract — raises `NotImplementedError` |
|
||||
| `get_batch_size` | `() -> int` | Returns `self.batch_size` |
|
||||
| `run` | `(input_data) -> list` | Runs inference on preprocessed input blob. Abstract — raises `NotImplementedError` |
|
||||
|
||||
## Internal Logic
|
||||
|
||||
Pure abstract class. All methods except `get_batch_size` raise `NotImplementedError` and must be overridden by subclasses (`OnnxEngine`, `TensorRTEngine`).
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **External**: `numpy` (declared in .pxd, not used in base)
|
||||
- **Internal**: none (leaf module)
|
||||
|
||||
## Consumers
|
||||
|
||||
- `onnx_engine` — subclass
|
||||
- `tensorrt_engine` — subclass
|
||||
- `inference` — type reference in .pxd
|
||||
|
||||
## Data Models
|
||||
|
||||
None.
|
||||
|
||||
## Configuration
|
||||
|
||||
None.
|
||||
|
||||
## External Integrations
|
||||
|
||||
None.
|
||||
|
||||
## Security
|
||||
|
||||
None.
|
||||
|
||||
## Tests
|
||||
|
||||
None found.
|
||||
Reference in New Issue
Block a user