mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 14:15:22 +03:00
fix formatting
This commit is contained in:
parent
6c5b44e3f8
commit
a92bd60742
@ -1,8 +1,10 @@
|
|||||||
import logging
|
import logging
|
||||||
from frigate.detectors.detector_config import ModelTypeEnum
|
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
from frigate.detectors.detector_config import ModelTypeEnum
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +64,9 @@ class DetectionApi(ABC):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
results = np.hstack((class_ids[..., np.newaxis], scores[..., np.newaxis], boxes))
|
results = np.hstack(
|
||||||
|
(class_ids[..., np.newaxis], scores[..., np.newaxis], boxes)
|
||||||
|
)
|
||||||
|
|
||||||
return np.resize(results, (20, 6))
|
return np.resize(results, (20, 6))
|
||||||
|
|
||||||
@ -70,4 +74,6 @@ class DetectionApi(ABC):
|
|||||||
if self.detector_config.model.model_type == ModelTypeEnum.yolonas:
|
if self.detector_config.model.model_type == ModelTypeEnum.yolonas:
|
||||||
return self.yolonas(output)
|
return self.yolonas(output)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f'Model type "{self.detector_config.model.model_type}" is currently not supported.')
|
raise ValueError(
|
||||||
|
f'Model type "{self.detector_config.model.model_type}" is currently not supported.'
|
||||||
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user