LilitYolyan / CutPaste

Unofficial implementation of Google "CutPaste: Self-Supervised Learning for Anomaly Detection and Localization" in PyTorch
MIT License
114 stars 25 forks source link

Bug of localization in train.py #23

Open zhiyuanyou opened 2 years ago

zhiyuanyou commented 2 years ago

Hi,

In train.py, there is a localization option shown like, parser.add_argument('--localization', default='False', choices=('True', 'False'), help='If True train on (64,64) cropped patches') However, if 'False' actually means True because 'False' is seen as string. So, the localization option is always True.

LilitYolyan commented 2 years ago

thanks for noticing, we will fix it asap

princeofpython commented 2 years ago

Also heatmap_on_image() in the final line of code has 3 arguments, but while defining it, there were only 2 arguments.