You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withopen(f"{dataDir}/predictions.csv", "r") asfile: #Change 'csv_prueba.csv' to the correspondant file name where predict.py saves the results of the prediction
reader=csv.DictReader(file)
cont=0
forrowinreader:
score=float(row["Average"]) #Reading QC score and cast it to float
ifscore>=threshold: #Experiment with different tresholds
name=row["Name"] #Get Image name
#name = name.replace("_crop", '') #Removing 'crop' from image name.
shutil.copy2(f"{dataDir}/{name}", f"{dataDir}/Best_Images_crop/{name2}") #Copying the image into Best_Images directory while renaming it to include score
cont+=1
print("%s images copied into 'Best_Images_crop' directory"%cont)