miscs (Interro02) : horizontal cutting resolution
This commit is contained in:
1 parent
5080274e8f
commit
0a86403ca6
28 files changed
+1447
-59
No files matched your search
@@ -0,0 +1,13 @@
|
||||
"""Geometry checks shared by correction and annotation rendering."""
|
||||
|
||||
import math
|
||||
from numbers import Real
|
||||
|
||||
|
||||
def valid_feedback_box(box) -> bool:
|
||||
return (
|
||||
isinstance(box, (list, tuple)) and len(box) == 4
|
||||
and all(isinstance(value, Real) and not isinstance(value, bool)
|
||||
and math.isfinite(value) for value in box)
|
||||
and box[0] < box[2] and box[1] < box[3]
|
||||
)
|
||||
Reference in new issue
Block a user