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

Update get_train_val_YOLO.py

parent aa516d92
No related branches found
No related tags found
No related merge requests found
...@@ -56,8 +56,9 @@ for i in tqdm(os.listdir(path)): ...@@ -56,8 +56,9 @@ for i in tqdm(os.listdir(path)):
df = pd.concat([df, table]) df = pd.concat([df, table])
df.reset_index(inplace = True) df.reset_index(inplace = True)
df.espece = df.espece.astype(str)
tab = df.groupby('espece').count() tab = df.groupby('espece').count()
tab = tab.sort_values(tab.columns[0],ascending = False).sample(NB_CLASS) tab = tab.sort_values(tab.columns[0],ascending = False)[:NB_CLASS]
tab.index = tab.index.astype(str) tab.index = tab.index.astype(str)
compte = pd.DataFrame(np.zeros((len(tab)+1,1)),columns = ['nombre']) compte = pd.DataFrame(np.zeros((len(tab)+1,1)),columns = ['nombre'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment