Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jfc43 committed Oct 7, 2020
1 parent d45c0ab commit e967f4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ To evaluate an OOD detection method, you can use the following command:
`python eval_ood_detection.py --in-dataset {in-distribution dataset} --name {model name} --method {scoring function} [--adv or --corrupt or --adv-corrupt]`

The argument `--adv` is to evaluate L_inf OOD, `--corrupt` is to evaluate Corrupted OOD, `--adv-corrupt` is to evaluate Comp. OOD. You can only specify one of them. Without them, it will evaluate natural OOD.
`{in-distribution dataset}` can be `SVHN`, `CIFAR-10` or `CIFAR-100`.
`{scoring function}` can be `msp`, `odin`, `mahalanobis`, `sofl`, `rowl`, `ntom` or `atom`.
`{model name}` is the name of the model that you have trained. It should match the corresponding scoring function. See the following table for the matchings:

| model name | scoring function |
| ------------- | ------------- |
| vanilla | msp |
| vanilla | odin |
| vanilla | mahalanobis |
| SOFL | sofl |
| OE | msp |
| ACET | msp |
| CCU | msp |
| ROWL | rowl |
| NTOM | ntom |
| ATOM | atom |

### Citation
Please cite our work if you use the codebase:
Expand Down
2 changes: 1 addition & 1 deletion eval_ood_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
parser = argparse.ArgumentParser(description='Pytorch Detecting Out-of-distribution examples in neural networks')

parser.add_argument('--in-dataset', default="CIFAR-10", type=str, help='in-distribution dataset')
parser.add_argument('--name', required=True, type=str, help='model name')
parser.add_argument('--name', required=True, type=str, help='the name of the model trained')
parser.add_argument('--model-arch', default='densenet', type=str, help='model architecture')

parser.add_argument('--gpu', default = '0', type = str, help='gpu index')
Expand Down

0 comments on commit e967f4d

Please sign in to comment.