Skip to content
Snippets Groups Projects
Commit bed2c86e authored by Stephane Chavin's avatar Stephane Chavin
Browse files

modify

parent 2824ad17
Branches
No related tags found
No related merge requests found
...@@ -185,7 +185,7 @@ def process(x): ...@@ -185,7 +185,7 @@ def process(x):
H,W = im.shape[0], im.shape[1] H,W = im.shape[0], im.shape[1]
for l in range(len(fin)): for l in range(len(fin)):
x, y, w, h = fin.x.iloc[l]*W , fin.y.iloc[l]*H , fin.w.iloc[l]*W , fin.h.iloc[l]*H x, y, w, h = fin.x.iloc[l]*W , fin.y.iloc[l]*H , fin.width.iloc[l]*W , fin.height.iloc[l]*H
shape1 = (int(x-(0.5*w)), int(y+(0.5*h))) shape1 = (int(x-(0.5*w)), int(y+(0.5*h)))
shape2 = (int(x+(0.5*w)), int(y+(0.5*h))) shape2 = (int(x+(0.5*w)), int(y+(0.5*h)))
...@@ -210,6 +210,7 @@ def process(x): ...@@ -210,6 +210,7 @@ def process(x):
cv2.putText(im, label, text_shape, cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255,255,255), 1) cv2.putText(im, label, text_shape, cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255,255,255), 1)
plt.imshow(im) plt.imshow(im)
plt.subplots_adjust(top=1, bottom=0, left=0, right=1)
try: try:
plt.savefig(os.path.join(directory, str('images_annotes_'+str(today.day)+'_'+str(today.month)),str(name+'.jpg'))) plt.savefig(os.path.join(directory, str('images_annotes_'+str(today.day)+'_'+str(today.month)),str(name+'.jpg')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment