openvino#

Model wrappers.

class otx.algorithms.action.adapters.openvino.model_wrappers.OTXOVActionCls(model_adapter: OpenvinoAdapter, configuration=None, preload=False)#

OTX Action Classification model for openvino task.

postprocess(outputs: Dict[str, ndarray], meta: Dict[str, Any])#

Post-process.

preprocess(inputs: List[DatasetItemEntity])#

Pre-process.

class otx.algorithms.action.adapters.openvino.model_wrappers.OTXOVActionDet(model_adapter: OpenvinoAdapter, configuration=None, preload=False)#

OTX Action Detection model for openvino task.

postprocess(outputs: Dict[str, ndarray], meta: Dict[str, Any])#

Post-process.

preprocess(inputs: List[DatasetItemEntity])#

Pre-process.

static reshape(inputs: List[ndarray]) ndarray#

Reshape(expand, transpose, permute) the input np.ndarray.

Data loaders for OpenVINO action recognition models.

class otx.algorithms.action.adapters.openvino.dataloader.ActionOVClsDataLoader(dataset: DatasetEntity, clip_len: int, width: int, height: int)#

DataLoader for evaluation of action classification models.

It iterates through clustered video, and it samples frames from given video

add_prediction(dataset: DatasetEntity, data: List[DatasetItemEntity], prediction: AnnotationSceneEntity)#

Add prediction to dataset.

Add prediction result to dataset_item in dataset, which has same video id with video data.

class otx.algorithms.action.adapters.openvino.dataloader.ActionOVDemoDataLoader(dataset: DatasetEntity, task_type: str, clip_len: int, width: int, height: int)#

DataLoader for online demo purpose.

Since it is for online demo purpose it selects background frames from neighbor of key frame

add_prediction(data: List[DatasetItemEntity], prediction: AnnotationSceneEntity)#

Add prediction results to key frame.

From sampling methods, we know that data[len(data) // 2] is key frame

class otx.algorithms.action.adapters.openvino.dataloader.ActionOVDetDataLoader(dataset: DatasetEntity, clip_len: int, width: int, height: int)#

DataLoader for evaluation of spatio-temporal action detection models.

It iterates through DatasetEntity, which only contains non-empty frame(frame with actor annotation) It samples background frames from original DatasetEntity, which contain both empty frame and non-empty frame

add_prediction(data: List[DatasetItemEntity], prediction: AnnotationSceneEntity)#

Add prediction results to key frame.

otx.algorithms.action.adapters.openvino.dataloader.get_ovdataloader(dataset: DatasetEntity, task_type: str, clip_len: int, width: int, height: int) DataLoader#

Find proper dataloader for dataset and task type.

If dataset has only a single video, this returns DataLoader for online demo If dataset has multiple videos, this return DataLoader for academia evaluation