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

Update get_train_annot_YOLO.py

parent 2bc5a8a9
No related branches found
No related tags found
No related merge requests found
...@@ -167,12 +167,12 @@ def process(x): ...@@ -167,12 +167,12 @@ def process(x):
for l in range(len(fin)): for l in range(len(fin)):
try : try :
plt.gca().add_patch(Rectangle(((fin.x.iloc[l]*len(time))-(0.5*fin.w.iloc[l]*len(time)), ((fin.y.iloc[l]*len(freq))+0.5*fin.height.iloc[l]*len(freq))), fin.width.iloc[l]*len(time), fin.height.iloc[l]*len(freq), linewidth=3, edgecolor=color[int(fin.id.iloc[l])], facecolor='none')) plt.gca().add_patch(Rectangle(((fin.x.iloc[l]*len(time))-(0.5*fin.width.iloc[l]*len(time)), ((fin.y.iloc[l]*len(freq))+0.5*fin.height.iloc[l]*len(freq))), fin.width.iloc[l]*len(time), fin.height.iloc[l]*len(freq), linewidth=3, edgecolor=color[int(fin.id.iloc[l])], facecolor='none'))
except IndexError: except IndexError:
ipdb.set_trace() ipdb.set_trace()
try: try:
plt.savefig(os.path.join(directrory, 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')))
except Exception: except Exception:
os.mkdir(os.path.join(directory,str('images_annotes_'+str(today.day)+'_'+str(today.month)))) os.mkdir(os.path.join(directory,str('images_annotes_'+str(today.day)+'_'+str(today.month))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment