Description
The --result_folder deletes previous folder without warning.
if os.path.exists(opt.result_folder):
shutil.rmtree(opt.result_folder)
os.makedirs(opt.result_folder)
So if you happen to want to save your results in the same folder as your checkpoint weights, you delete it instead. This is incredibly risky behavior.
Recommendation
Confirm deletion before doing so with:
if os.path.exists(opt.result_folder):
print(f"About to delete: {opt.result_folder}")
input("Press Enter to confirm...")
shutil.rmtree(opt.result_folder)
os.makedirs(opt.result_folder)
OR, just don't delete the folder in the first place.
Description
The --result_folder deletes previous folder without warning.
So if you happen to want to save your results in the same folder as your checkpoint weights, you delete it instead. This is incredibly risky behavior.
Recommendation
Confirm deletion before doing so with:
OR, just don't delete the folder in the first place.