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

updates

parent 2f47db37
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,6 @@ for w in range (len(df)):
def process(x):
#for i in tqdm(df.groupby('Path')): #la colonne dir correspond au path
count, (i) = x
for j in range (NB_IMG_PER_REC): #30*8 secondes - 30*2 secondes (overlap) = 180 secondes affichées sur 30 images : n'affiche que les 3 premières minutes d'un enregistrement
......@@ -65,7 +64,6 @@ def process(x):
vmin = np.flipud(np.log10(np.abs(stft))).mean()
vmax = np.flipud(np.log10(np.abs(stft))).max()
#a = plt.specgram(y, Fs=sr, NFFT=window_size, noverlap=512, cmap='jet', vmin=vmin*10, vmax=vmax*10)
plt.imshow(np.flipud(np.log10(np.abs(stft))),aspect = "auto",interpolation = None,cmap = 'jet',vmin = vmin,vmax = vmax)
plt.subplots_adjust(top=1, bottom=0, left=0, right=1)
......@@ -80,6 +78,4 @@ def process(x):
os.mkdir(str(direction+folder))
plt.savefig(str(direction+folder+name+'.jpg'))
#count+=1
p_map(process, enumerate(df.groupby('Path')), num_cpus=10) #la colonne dir correspond au path
......@@ -6,15 +6,14 @@ import argparse
from datetime import date
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter, description='TODO')
parser.add_argument('-p','--path_to_data', type=str, help = 'Path of the folder that contain the recodings',required=True)
parser.add_argument('-d','--direction', type=str, help = 'Directory to wich spectrogram and .txt files will be stored',required=True)
parser.add_argument('-p','--path_to_data', type=str, help = 'Path of the folder that contain the .txt files',required=True)
parser.add_argument('-d','--direction', type=str, help = 'Directory to wich the dataframe will be stored',required=True)
args = parser.parse_args()
annots = str(args.path_to_detection)
annots = str(args.path_to_data)
today = date.today()
model_name = '' #put the model name here
out_file = str('YOLO_detection_'+model_name+str('_'+today.day+'_'+today.month))
out_file = str('YOLO_detection_'+str('_'+today.day+'_'+today.month))
outdir = str(args.direction)
......@@ -77,7 +76,7 @@ for i in tqdm(os.listdir(annots)):
df = pd.concat([df, table])
#put the classes here
names = [ 'wtsp','coye','oven','swsp','rwbl','nawa','heth','alfl','mawa','btnw','yrwa','veer','swth','rcki','btbw','amre','sosp','lisp','gcki','revi','blja']
names = []
df['annot'] = 'None'
for j in range (len(df)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment