mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
scripts/libraries: Move _NO_DETECTION into post-processors.
MicroPython doesn't import _NO_DETECTION from utils using the wildcard operator. Importing it by name works, but, only after removing the const() part in the call.
This commit is contained in:
parent
c282c9474c
commit
1e8eb2ec2f
@ -31,6 +31,9 @@ from micropython import const
|
|||||||
from ulab import numpy as np
|
from ulab import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
_NO_DETECTION = const(())
|
||||||
|
|
||||||
|
|
||||||
# This is a lightweight version of the tiny yolo v2 object detection algorithm.
|
# This is a lightweight version of the tiny yolo v2 object detection algorithm.
|
||||||
# It was optimized to work well on embedded devices with limited computational resources.
|
# It was optimized to work well on embedded devices with limited computational resources.
|
||||||
class YoloV2:
|
class YoloV2:
|
||||||
|
|||||||
@ -31,6 +31,9 @@ from micropython import const
|
|||||||
from ulab import numpy as np
|
from ulab import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
_NO_DETECTION = const(())
|
||||||
|
|
||||||
|
|
||||||
class Fomo:
|
class Fomo:
|
||||||
_FOMO_CLASSES = const(1)
|
_FOMO_CLASSES = const(1)
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,9 @@ from micropython import const
|
|||||||
from ulab import numpy as np
|
from ulab import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
_NO_DETECTION = const(())
|
||||||
|
|
||||||
|
|
||||||
class BlazeFace:
|
class BlazeFace:
|
||||||
_BLAZEFACE_CX = const(0)
|
_BLAZEFACE_CX = const(0)
|
||||||
_BLAZEFACE_CY = const(1)
|
_BLAZEFACE_CY = const(1)
|
||||||
|
|||||||
@ -31,6 +31,9 @@ from micropython import const
|
|||||||
from ulab import numpy as np
|
from ulab import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
_NO_DETECTION = const(())
|
||||||
|
|
||||||
|
|
||||||
class YoloV5:
|
class YoloV5:
|
||||||
_YOLO_V5_CX = const(0)
|
_YOLO_V5_CX = const(0)
|
||||||
_YOLO_V5_CY = const(1)
|
_YOLO_V5_CY = const(1)
|
||||||
|
|||||||
@ -30,9 +30,6 @@ import math
|
|||||||
from ulab import numpy as np
|
from ulab import numpy as np
|
||||||
|
|
||||||
|
|
||||||
_NO_DETECTION = const(())
|
|
||||||
|
|
||||||
|
|
||||||
def logit(x):
|
def logit(x):
|
||||||
return np.log(x / (1.0 - x))
|
return np.log(x / (1.0 - x))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user