mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 09:26:32 +00:00
fc57d677b4
- Updated various Cython files to explicitly cast types, enhancing type safety and readability. - Adjusted the `engine_name` property in `InferenceEngine` and its subclasses to be set directly in the constructor. - Modified the `request` method in `_SessionWithBase` to accept `*args` for better flexibility. - Ensured proper type casting for return values in methods across multiple classes, including `Inference`, `CoreMLEngine`, and `TensorRTEngine`. These changes aim to streamline the codebase and improve maintainability by enforcing consistent type usage.
11 lines
293 B
Cython
11 lines
293 B
Cython
from typing import List, Tuple
|
|
import numpy as np
|
|
|
|
|
|
cdef class InferenceEngine:
|
|
cdef public int batch_size
|
|
cdef public str engine_name
|
|
cdef tuple get_input_shape(self) # type: ignore
|
|
cdef int get_batch_size(self) # type: ignore
|
|
cdef run(self, input_data) # type: ignore
|