From 05970f87a68a550bcfbb100997bf01b3b373232e Mon Sep 17 00:00:00 2001 From: Mukul Khanna Date: Thu, 12 Jul 2018 23:28:26 +0530 Subject: [PATCH] Support for multiple classes --- scripts/convert.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/convert.py b/scripts/convert.py index 8eeb7cff4e1..e63f9177718 100644 --- a/scripts/convert.py +++ b/scripts/convert.py @@ -26,8 +26,7 @@ def convert(size, box): y = y*dh h = h*dh return (x,y,w,h) - - + """-------------------------------------------------------------------""" """ Configure Paths""" @@ -95,6 +94,11 @@ def convert(size, box): bb = convert((w,h), b) print(bb) txt_outfile.write(str(cls_id) + " " + " ".join([str(a) for a in bb]) + '\n') + else: + elems = line.split(' ') + print("class") + #support for different classes + cls_id=elems[0] """ Save those images with bb into list""" if(ct != 0):