Spaces:
Runtime error
Runtime error
Niv Sardi
commited on
Commit
·
8aa2646
1
Parent(s):
d8acda9
less debugging
Browse filesSigned-off-by: Niv Sardi <xaiki@evilgiggle.com>
- python/imtool.py +1 -3
python/imtool.py
CHANGED
|
@@ -111,7 +111,7 @@ def crop(id, fn, logos):
|
|
| 111 |
eix = six + l.w
|
| 112 |
eiy = siy + l.h
|
| 113 |
|
| 114 |
-
print('intersect', (six, siy), (eix, eiy), f, l)
|
| 115 |
|
| 116 |
if six < 0:
|
| 117 |
if six + l.w < 0:
|
|
@@ -138,7 +138,6 @@ def crop(id, fn, logos):
|
|
| 138 |
|
| 139 |
c = (255, 0, 0)
|
| 140 |
|
| 141 |
-
print(start, end)
|
| 142 |
nim = im[start[1]:end[1], start[0]:end[0]]
|
| 143 |
img_name =f"{img_out}/{basename}-x{x}y{y}.jpg"
|
| 144 |
txt_name =f"{txt_out}/{basename}-x{x}y{y}.txt"
|
|
@@ -147,7 +146,6 @@ def crop(id, fn, logos):
|
|
| 147 |
if len(li):
|
| 148 |
with open(txt_name, 'w') as f:
|
| 149 |
for p in li:
|
| 150 |
-
print(p)
|
| 151 |
dim = cv2.rectangle(nim,
|
| 152 |
floor_point(p.x - p.w/2, p.y - p.h/2),
|
| 153 |
floor_point(p.x + p.w/2, p.y + p.h/2),
|
|
|
|
| 111 |
eix = six + l.w
|
| 112 |
eiy = siy + l.h
|
| 113 |
|
| 114 |
+
#print('intersect', (six, siy), (eix, eiy), f, l)
|
| 115 |
|
| 116 |
if six < 0:
|
| 117 |
if six + l.w < 0:
|
|
|
|
| 138 |
|
| 139 |
c = (255, 0, 0)
|
| 140 |
|
|
|
|
| 141 |
nim = im[start[1]:end[1], start[0]:end[0]]
|
| 142 |
img_name =f"{img_out}/{basename}-x{x}y{y}.jpg"
|
| 143 |
txt_name =f"{txt_out}/{basename}-x{x}y{y}.txt"
|
|
|
|
| 146 |
if len(li):
|
| 147 |
with open(txt_name, 'w') as f:
|
| 148 |
for p in li:
|
|
|
|
| 149 |
dim = cv2.rectangle(nim,
|
| 150 |
floor_point(p.x - p.w/2, p.y - p.h/2),
|
| 151 |
floor_point(p.x + p.w/2, p.y + p.h/2),
|