mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 05: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.
25 lines
456 B
Cython
25 lines
456 B
Cython
from engines.inference_engine cimport InferenceEngine
|
|
|
|
|
|
cdef class TensorRTEngine(InferenceEngine):
|
|
|
|
cdef public object context
|
|
|
|
cdef public object d_input
|
|
cdef public object d_output
|
|
cdef str input_name
|
|
cdef list input_shape
|
|
|
|
cdef object h_output
|
|
cdef str output_name
|
|
cdef object output_shape
|
|
|
|
cdef object stream
|
|
|
|
|
|
cdef tuple get_input_shape(self)
|
|
|
|
cdef int get_batch_size(self)
|
|
|
|
cdef run(self, input_data)
|