File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,11 @@ def detect(
103
103
if label_length == 1 :
104
104
true_label = atuple [0 ]
105
105
else :
106
- true_label = (int (atuple [0 ]), int (atuple [1 ]), int (atuple [2 ]))
106
+ true_label = (
107
+ int (round (float (atuple [0 ]))),
108
+ int (round (float (atuple [1 ]))),
109
+ int (round (float (atuple [2 ]))),
110
+ )
107
111
108
112
# Define LED and IR instance
109
113
prepare_gpio ()
Original file line number Diff line number Diff line change @@ -73,7 +73,11 @@ def prompt_label():
73
73
if len (atuple ) == 1 :
74
74
return atuple [0 ]
75
75
else :
76
- return (int (atuple [0 ]), int (atuple [1 ]), int (atuple [2 ]))
76
+ return (
77
+ int (round (float (atuple [0 ]))),
78
+ int (round (float (atuple [1 ]))),
79
+ int (round (float (atuple [2 ]))),
80
+ )
77
81
78
82
79
83
def prompt_type ():
You can’t perform that action at this time.
0 commit comments