From a0bb1726e346798597b5f3f30d0b87134eecd063 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Tue, 2 Jun 2020 20:42:47 +0200 Subject: [PATCH] Fix old cascade format function to work with Python3. --- ml/haarcascade/cascade_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml/haarcascade/cascade_convert.py b/ml/haarcascade/cascade_convert.py index f24dc19cb..2de58daeb 100755 --- a/ml/haarcascade/cascade_convert.py +++ b/ml/haarcascade/cascade_convert.py @@ -223,7 +223,7 @@ def cascade_binary_old(path, n_stages, name): n_stages = max_stages # read stages - stages = [len(t.childNodes)/2 for t in trees][0:n_stages] + stages = [len(t.childNodes)//2 for t in trees][0:n_stages] stage_threshold = xmldoc.getElementsByTagName('stage_threshold')[0:n_stages] # total number of features