Commit f9a505e0 authored by mihaivanea's avatar mihaivanea
Browse files

Preparing the job description for testing running one condor job on Wider Face

parent 7c250caf
#!/vol/bitbucket/mv1315/urop/venv/bin/python3
#!/vol/bitbucket/mv1316/urop/venv/bin/python3
import imp
facenet = imp.load_source("detect_face",
......@@ -65,12 +65,10 @@ def tokenise(source):
for i in range(len(source_lines)):
tok = []
coords = []
#if "img" in source_lines[i]:
if search("[a-zA-Z]", source_lines[i]):
tok.append(source_lines[i])
j = i + 1
while j in range(len(source_lines)):
#if "img" not in source_lines[j]:
if not search("[a-zA-Z]", source_lines[j]):
tok.append(source_lines[j])
j += 1
......@@ -79,13 +77,11 @@ def tokenise(source):
if len(tok) > 1:
try:
name = tok[0]
#print(tok[1])
no_faces = int(tok[1])
total_faces += no_faces
for k in range(2, len(tok)):
coords.append(tok[k])
tokens.append((name, no_faces, coords))
#print(no_faces, len(coords))
coords = []
tok = []
except Exception:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment