Comments (3)
Thank you again for your great support and responsiveness and your great work!
from csi.
And the same question for the steel dataset in the appendix; looks like this didn't get in the code?
from csi.
Hi! Thank you again for your interest!
Before answering the question, we found that there is a minor value mistake in Table 6 (DTD to ImageNet detection). Even after fixing the minor bug, we found out that our message doesn't change.
- reported: Base 96.4, CSI(Rotation) 65.4
- fixed: Base 90.0, CSI(Rotation) 79.9
- The mistake was due to the evaluation code. Please aware if you are using an imagenet sized in-lier dataset (add option to line 146 in
evals/ood_pre.py
e.g.,P.dataset == 'dtd'
)
To use DTD as in-liers, you should first divide the DTD dataset into train/test sets. The following code is the one I have implemented to divide the set. Run this code at the ~/data/dtd
folder. (and note that you should create test
folder before running the code)
import os
import shutil
f = open('labels/test1.txt', 'r')
while True:
line = f.readline()
if not line: break
line = line.replace("\n", "")
test_class, test_sample_name = line.split('/')
if not os.path.exists(f'./test/{test_class}'):
os.mkdir(f'./test/{test_class}')
shutil.move(f'./images/{line}', f'./test/{line}')
f.close()
After dividing the set, you can use DTD as a training dataset with some modification on your dataset.py
code (just as same as loading cifar10 or ImageNet). Also, I believe you should modify the code a little since we restricted the argument parsers for --dataset
.
For CSI training, we have used unlabeled multiclass training for DTD.
CUDA_VISIBLE_DEVICES=0,1,2,3 python -m torch.distributed.launch --nproc_per_node=4 train.py --dataset dtd --model resnet18_imagenet --mode simclr_CSI --shift_trans_type rotation --batch_size 32
For CSI evaluation:
python eval.py --mode ood_pre --dataset dtd --ood_dataset imagenet --model resnet18_imagenet --ood_score CSI --shift_trans_type rotation --print_score --ood_samples 10 --resize_factor 0.54 --resize_fix --load_path <MODEL_PATH>
For the steel dataset, we didn't open the code since it shows similar results with the DTD dataset. Of course, you can download the dataset and run the code: https://www.kaggle.com/c/severstal-steel-defect-detection/data
Thank you again for your interest and feel free to ask if you have any questions!
from csi.
Related Issues (20)
- Why you add a normalize layer on the head of resnet instead of using the normalize augment HOT 1
- Your data is 4 times bigger than Simclr. Is it fair? HOT 1
- Can you share the implementation detail for baseline?(Cross-Entropy) HOT 3
- Why did you do the rotation transformation firstly and then apply the simlcr_aug? HOT 1
- batch size HOT 4
- The result of using the checkpoint of unlabeled ImageNet-30 HOT 3
- CSI/training/unsup/simclr_CSI.py HOT 1
- Error while running the training script. HOT 1
- GPU requirement for training ImageNet model HOT 1
- About how to get result for noise condition
- How to define the joint_labels
- ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found HOT 1
- The hyper parmeter of Rot(resnet18) and Rot+Trans(resnet18)
- Reproducing results for Cifar100 ens multi-class
- How can i train it on my own dataset? HOT 10
- GPU requirement for training One-class ImageNet-30
- Some questions about Supervised_NT_xent
- baseline code?
- cannot reach the results when removing the four-way rotation classifier
- why use the hfilp() function during training? What does it do?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csi.