-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproducing Result on ImageNet-A Dataset #15
Comments
@zhangletian2 do u solve the issue? |
Hi all, thank you all for trying out the code. Could you provide more details about the command you ran? Also, @zhaihaotian which "cross-dataset" was it? |
@azshue Thank you for reply. I evaluated the caltech101 and UCF101, they all got the same accuracy as the paper, but when evalutaing the Imagenet-adversial and Imagenet-rendition, i will get the strange result as I showed before. I didn't try the other dataset. |
That's my tpt.sh , I use the default setting. #!/bin/bash
data_root='/workspace/CaFo/data'
testsets=$1
arch=RN50
# arch=ViT-B/16
bs=64
ctx_init=a_photo_of_a
python ./tpt_classification.py ${data_root} --test_sets ${testsets} \
-a ${arch} -b ${bs} --gpu 0 \
--tpt --ctx_init ${ctx_init} |
If this issue only happens when evaluating ImageNet-A and ImageNet-R, there might be something wrong with the label masking. These two datasets only have 200 of the 1000 ImageNet classes, so we need to "reset" the Could you double-check if everything is running as expected under this if statement? |
I think it is running as expected , i print the classname to check whether it is right , and it only has 200 classes in ImageNet-A and ImageNet-R. imagenet_a_classname = [
'stingray', 'goldfinch', 'junco', 'American robin', 'jay', 'bald eagle', 'vulture', 'newt',
'American bullfrog', 'box turtle', 'green iguana', 'agama', 'chameleon', 'American alligator',
'garter snake', 'harvestman', 'scorpion', 'tarantula', 'centipede', 'sulphur-crested cockatoo',
'lorikeet', 'hummingbird', 'toucan', 'duck', 'goose', 'koala', 'jellyfish', 'sea anemone',
'flatworm', 'snail', 'crayfish', 'hermit crab', 'flamingo', 'great egret', 'oystercatcher',
'pelican', 'sea lion', 'Chihuahua', 'Golden Retriever', 'Rottweiler', 'German Shepherd Dog',
'pug', 'red fox', 'Persian cat', 'lynx', 'lion', 'American black bear', 'mongoose', 'ladybug',
'rhinoceros beetle', 'weevil', 'fly', 'bee', 'ant', 'grasshopper', 'stick insect', 'cockroach',
'praying mantis', 'leafhopper', 'dragonfly', 'monarch butterfly', 'small white butterfly',
'gossamer-winged butterfly', 'starfish', 'cottontail rabbit', 'porcupine', 'fox squirrel',
'marmot', 'bison', 'skunk', 'armadillo', 'baboon', 'white-headed capuchin', 'African bush elephant',
'pufferfish', 'academic gown', 'accordion', 'acoustic guitar', 'airliner', 'ambulance', 'apron',
'balance beam', 'balloon', 'banjo', 'barn', 'wheelbarrow', 'basketball', 'lighthouse', 'beaker',
'bikini', 'hunting bow', 'bow tie', 'breastplate', 'broom', 'candle', 'canoe', 'castle', 'cello',
'chain', 'storage chest', 'Christmas stocking', 'cowboy boot', 'cradle', 'rotary dial telephone',
'digital clock', 'doormat', 'drumstick', 'dumbbell', 'envelope', 'feather boa', 'flagpole',
'forklift', 'fountain', 'garbage truck', 'goblet', 'go-kart', 'golf cart', 'grand piano',
'hair dryer', 'clothes iron', 'carved pumpkin', 'jeep', 'kimono', 'lighter', 'limousine',
'manhole cover', 'maraca', 'marimba', 'mask', 'mitten', 'mosque', 'metal nail', 'obelisk',
'ocarina', 'pipe organ', 'parachute', 'parking meter', 'piggy bank', 'pool table', 'hockey puck',
'quill', 'racket', 'fishing casting reel', 'revolver', 'rocking chair', 'rugby ball', 'salt shaker',
'sandal', 'saxophone', 'school bus', 'schooner', 'sewing machine', 'shovel', 'sleeping bag',
'snowmobile', 'snowplow', 'soap dispenser', 'spatula', 'spider web', 'steam locomotive',
'stethoscope', 'couch', 'submarine', 'sundial', 'suspension bridge', 'syringe', 'tank',
'teddy bear', 'toaster', 'torch', 'tricycle', 'umbrella', 'unicycle', 'viaduct', 'volleyball',
'washing machine', 'water tower', 'wine bottle', 'shipwreck', 'guacamole', 'pretzel',
'cheeseburger', 'hot dog', 'broccoli', 'cucumber', 'bell pepper', 'mushroom', 'lemon', 'banana',
'cherimoya (custard apple)', 'pomegranate', 'carbonara', 'bubble', 'cliff', 'volcano',
'baseball player', 'rapeseed', "yellow lady's slipper", 'corn', 'acorn'
]
imagenet_r_classname = [
'goldfish', 'great white shark', 'hammerhead shark', 'stingray', 'hen', 'ostrich', 'goldfinch',
'junco', 'bald eagle', 'vulture', 'smooth newt', 'axolotl', 'tree frog', 'green iguana',
'chameleon', 'Indian cobra', 'scorpion', 'tarantula', 'centipede', 'peafowl', 'lorikeet',
'hummingbird', 'toucan', 'duck', 'goose', 'black swan', 'koala', 'jellyfish', 'snail',
'American lobster', 'hermit crab', 'flamingo', 'great egret', 'pelican', 'king penguin',
'grey whale', 'killer whale', 'sea lion', 'Chihuahua', 'Shih Tzu', 'Afghan Hound', 'Basset Hound',
'Beagle', 'Bloodhound', 'Italian Greyhound', 'Whippet', 'Weimaraner', 'Yorkshire Terrier',
'Boston Terrier', 'Scottish Terrier', 'West Highland White Terrier', 'Golden Retriever',
'Labrador Retriever', 'Cocker Spaniel', 'collie', 'Border Collie', 'Rottweiler', 'German Shepherd Dog',
'Boxer', 'French Bulldog', 'St. Bernard', 'Siberian Husky', 'Dalmatian', 'pug', 'Pomeranian',
'Chow Chow', 'Pembroke Welsh Corgi', 'Toy Poodle', 'Standard Poodle', 'grey wolf', 'hyena',
'red fox', 'tabby cat', 'leopard', 'snow leopard', 'lion', 'tiger', 'cheetah', 'polar bear',
'meerkat', 'ladybug', 'fly', 'bee', 'ant', 'grasshopper', 'cockroach', 'praying mantis',
'dragonfly', 'monarch butterfly', 'starfish', 'cottontail rabbit', 'porcupine', 'fox squirrel',
'beaver', 'guinea pig', 'zebra', 'pig', 'hippopotamus', 'bison', 'gazelle', 'llama', 'skunk',
'badger', 'orangutan', 'gorilla', 'chimpanzee', 'gibbon', 'baboon', 'giant panda', 'eel',
'clownfish', 'pufferfish', 'accordion', 'ambulance', 'assault rifle', 'backpack', 'barn',
'wheelbarrow', 'basketball', 'bathtub', 'lighthouse', 'beer glass', 'binoculars', 'birdhouse',
'bow tie', 'broom', 'bucket', 'cauldron', 'candle', 'cannon', 'canoe', 'carousel', 'castle',
'mobile phone', 'cowboy hat', 'electric guitar', 'fire truck', 'flute', 'gas mask or respirator',
'grand piano', 'guillotine', 'hammer', 'harmonica', 'harp', 'hatchet', 'jeep', 'joystick',
'lab coat', 'lawn mower', 'lipstick', 'mailbox', 'missile', 'mitten', 'parachute', 'pickup truck',
'pirate ship', 'revolver', 'rugby ball', 'sandal', 'saxophone', 'school bus', 'schooner',
'shield', 'soccer ball', 'space shuttle', 'spider web', 'steam locomotive', 'scarf',
'submarine', 'tank', 'tennis ball', 'tractor', 'trombone', 'vase', 'violin', 'military aircraft',
'wine bottle', 'ice cream', 'bagel', 'pretzel', 'cheeseburger', 'hot dog', 'cabbage', 'broccoli',
'cucumber', 'bell pepper', 'mushroom', 'Granny Smith apple', 'strawberry', 'lemon', 'pineapple',
'banana', 'pomegranate', 'pizza', 'burrito', 'espresso', 'volcano', 'baseball player',
'scuba diver', 'acorn'
] |
Has anyone else managed to reproduce the results of the imagenet series dataset experiments? |
Thanks, i will check it in my code |
Thank you for your replies. |
Thanks for the wonderful work!
However, when I use
test_tpt.sh
and ViT-B/16 backbone to reproduce the experiment result on ImageNet-A, I got strangely low accuracy:I'm confused of the results, and I would be highly appreciated it if you can provide some insight!
The text was updated successfully, but these errors were encountered: