About Me:
⚡ Website: https://xiaomengyc.github.io/
⚡ Google Scholar: https://scholar.google.com.hk/citations?hl=en&user=BPEA2NMAAAAJ
(ECCV2018) Self-produced Guidance for Weakly-supervised Object Localization
Home Page: https://arxiv.org/abs/1807.08902
License: MIT License
About Me:
⚡ Website: https://xiaomengyc.github.io/
⚡ Google Scholar: https://scholar.google.com.hk/citations?hl=en&user=BPEA2NMAAAAJ
Epoch: [0][20/300] Time 0.925 (0.968) ETA 00:28:44(00:04:50) Loss 5.3001 (5.6576) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][40/300] Time 0.912 (0.943) ETA 00:27:40(00:04:42) Loss 5.4433 (5.5504) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][60/300] Time 0.920 (0.937) ETA 00:27:11(00:04:41) Loss 5.4316 (5.4998) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][80/300] Time 0.923 (0.937) ETA 00:26:52(00:04:41) Loss 5.6090 (5.4800) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][100/300] Time 0.941 (0.934) ETA 00:26:28(00:04:40) Loss 5.3967 (5.4582) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][120/300] Time 0.938 (0.934) ETA 00:26:09(00:04:40) Loss 5.3338 (5.4500) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][140/300] Time 0.943 (0.938) ETA 00:25:58(00:04:41) Loss 5.3689 (5.4394) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][160/300] Time 1.014 (0.941) ETA 00:25:43(00:04:42) Loss 5.4100 (5.4387) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][180/300] Time 0.942 (0.942) ETA 00:25:26(00:04:42) Loss 5.3895 (5.4408) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][200/300] Time 0.939 (0.942) ETA 00:25:08(00:04:42) Loss 5.9786 (5.4488) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][220/300] Time 0.942 (0.942) ETA 00:24:49(00:04:42) Loss 5.5643 (5.4577) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][240/300] Time 0.947 (0.943) ETA 00:24:32(00:04:42) Loss 5.5316 (5.4707) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][260/300] Time 0.948 (0.943) ETA 00:24:13(00:04:43) Loss 5.6451 (5.4792) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][280/300] Time 0.945 (0.944) ETA 00:23:55(00:04:43) Loss 5.8763 (5.4896) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
Epoch: [0][0/300] Time 0.679 (0.943) ETA 00:23:35(00:04:42) Loss 5.6554 (5.4943) Prec@1 0.000 (0.000) Prec@5 0.000 (0.000)
0,5.4943,0.000,0.000
=> loaded checkpoint '/user/pytorch/SPG-master/vgg16-397923af.pth'
Max iter: 320295
Traceback (most recent call last):
File "train_frame.py", line 194, in
train(args)
File "train_frame.py", line 120, in train
res = my_optim.reduce_lr(args, optimizer, current_epoch)
File "/user/pytorch/SPG-master/exper/my_optim.py", line 75, in reduce_lr
if change_points is not None and epoch in change_points:
File "/user/pytorch/SPG-master/exper/my_optim.py", line 71, in
change_points = map(lambda x: int(x.strip()), values)
ValueError: invalid literal for int() with base 10: 'none'
Hi, Thank you for sharing the code.
I have checked your code and realized there is no metric to measure top1-localization accuracy.
Also, val_list.txt for both cub and imagenet only contain class label not bounding box information.
Can you please explain how you evaluate the performance of top1-loc?
For example, where the bounding box information is or where the top1-loc metric is measured.
Thank you in advance!
Can you please provide a pre trained model for CUB-200-2011?
IOError: [Errno 2] No such file or directory: '/home/ltc/SPG/data/ILSVRC/Data/CLS-LOC/train/n03692522/n03692522_14326.JPEG'
when I run sh val_imagenet_full.sh
An error happened.
NameError: name 'inceptionv3_spg' is not defined
I saw you define inception3_spg
in models/google/inception3_spg.py
So here the --arch
should be inception3_spg
@xiaomengyc
Hi, the whole framework adopts modified Inception v3 as the backbone, but why the weights of pre-trained VGG-16 is restored in the training command line here?
I suppose the correct model path is "~/.torch/models/inception_v3_google-1a9a5a14.pth"?
../models/google/inception3_spg.py:137: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
nn.init.xavier_uniform(m.weight.data)
=> loading checkpoint '../models/inception_v3_google-1a9a5a14.pth'
KeyError
Traceback (most recent call last):
File "../utils/Restore.py", line 24, in restore
args.current_epoch = checkpoint['epoch'] + 1
KeyError: 'epoch'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train_frame.py", line 194, in
train(args)
File "train_frame.py", line 98, in train
model, optimizer= get_model(args)
File "train_frame.py", line 88, in get_model
restore(args, model, optimizer, including_opt=False)
File "../utils/Restore.py", line 38, in restore
_model_load(model, checkpoint)
File "../utils/Restore.py", line 51, in _model_load
if model_dict.keys()[0].startswith('module.'):
TypeError: 'odict_keys' object is not subscriptable
Which folder should I put the pre-training model “cub_epoch_100_glo_step_20200.pth.zip” and “imagenet_epoch_2_glo_step_128118.pth.zip” in?
HI!XiaoMeng!
The problem occurs when I load the pretrain model you provide at (https://drive.google.com/open?id=1EwRuqfGASarGidutnYB8rXLSuzYpEoSM). the model named imagenet_epoch_2_glo_step_128118.pth.tar.
error:
Missing key(s) in state_dict: "Conv2d_1a_3x3.conv.weight", "Conv2d_1a_3x3.bn.weight", "Conv2d_1a_3x3.bn.bias", "Conv2d_1a_3x3.bn.running_mean", "Conv2d_1a_3x3.bn.running_var", "Conv2d_2a_3x3.conv.weight", "Conv2d_2a_3x3.bn.weight", "Conv2d_2a_3x3.bn.bias", "Conv2d_2a_3x3.bn.running_mean", "Conv2d_2a_3x3.bn.running_var", "Conv2d_2b_3x3.conv.weight", "Conv2d_2b_3x3.bn.weight", "Conv2d_2b_3x3.bn.bias", "Conv2d_2b_3x3.bn.running_mean", "Conv2d_2b_3x3.bn.running_var", "Conv2d_3b_1x1.conv.weight", "Conv2d_3b_1x1.bn.weight", "Conv2d_3b_1x1.bn.bias", "Conv2d_3b_1x1.bn.running_mean", "Conv2d_3b_1x1.bn.running_var", "Conv2d_4a_3x3.conv.weight", "Conv2d_4a_3x3.bn.weight", "Conv2d_4a_3x3.bn.bias", "Conv2d_4a_3x3.bn.running_mean", "Conv2d_4a_3x3.bn.running_var", "Mixed_5b.branch1x1.conv.weight", "Mixed_5b.branch1x1.bn.weight", "Mixed_5b.branch1x1.bn.bias", "Mixed_5b.branch1x1.bn.running_mean", "Mixed_5b.branch1x1.bn.running_var", "Mixed_5b.branch5x5_1.conv.weight", "Mixed_5b.branch5x5_1.bn.weight", "Mixed_5b.branch5x5_1.bn.bias", "Mixed_5b.branch5x5_1.bn.running_mean", "Mixed_5b.branch5x5_1.bn.running_var", "Mixed_5b.branch5x5_2.conv.weight", "Mixed_5b.branch5x5_2.bn.weight", "Mixed_5b.branch5x5_2.bn.bias", "Mixed_5b.branch5x5_2.bn.running_mean", "Mixed_5b.branch5x5_2.bn.running_var", "Mixed_5b.branch3x3dbl_1.conv.weight", "Mixed_5b.branch3x3dbl_1.bn.weight", "Mixed_5b.branch3x3dbl_1.bn.bias", "Mixed_5b.branch3x3dbl_1.bn.running_mean", "Mixed_5b.branch3x3dbl_1.bn.running_var", "Mixed_5b.branch3x3dbl_2.conv.weight", "Mixed_5b.branch3x3dbl_2.bn.weight", "Mixed_5b.branch3x3dbl_2.bn.bias", "Mixed_5b.branch3x3dbl_2.bn.running_mean", "Mixed_5b.branch3x3dbl_2.bn.running_var", "Mixed_5b.branch3x3dbl_3.conv.weight", "Mixed_5b.branch3x3dbl_3.bn.weight", "Mixed_5b.branch3x3dbl_3.bn.bias", "Mixed_5b.branch3x3dbl_3.bn.running_mean", "Mixed_5b.branch3x3dbl_3.bn.running_var", "Mixed_5b.branch_pool.conv.weight", "Mixed_5b.branch_pool.bn.weight", "Mixed_5b.branch_pool.bn.bias", "Mixed_5b.branch_pool.bn.running_mean", "Mixed_5b.branch_pool.bn.running_var", "Mixed_5c.branch1x1.conv.weight", "Mixed_5c.branch1x1.bn.weight", "Mixed_5c.branch1x1.bn.bias", "Mixed_5c.branch1x1.bn.running_mean", "Mixed_5c.branch1x1.bn.running_var", "Mixed_5c.branch5x5_1.conv.weight", "Mixed_5c.branch5x5_1.bn.weight", "Mixed_5c.branch5x5_1.bn.bias", "Mixed_5c.branch5x5_1.bn.running_mean", "Mixed_5c.branch5x5_1.bn.running_var", "Mixed_5c.branch5x5_2.conv.weight", "Mixed_5c.branch5x5_2.bn.weight", "Mixed_5c.branch5x5_2.bn.bias", "Mixed_5c.branch5x5_2.bn.running_mean", "Mixed_5c.branch5x5_2.bn.running_var", "Mixed_5c.branch3x3dbl_1.conv.weight", "Mixed_5c.branch3x3dbl_1.bn.weight", "Mixed_5c.branch3x3dbl_1.bn.bias", "Mixed_5c.branch3x3dbl_1.bn.running_mean", "Mixed_5c.branch3x3dbl_1.bn.running_var", "Mixed_5c.branch3x3dbl_2.conv.weight", "Mixed_5c.branch3x3dbl_2.bn.weight", "Mixed_5c.branch3x3dbl_2.bn.bias", "Mixed_5c.branch3x3dbl_2.bn.running_mean", "Mixed_5c.branch3x3dbl_2.bn.running_var", "Mixed_5c.branch3x3dbl_3.conv.weight", "Mixed_5c.branch3x3dbl_3.bn.weight", "Mixed_5c.branch3x3dbl_3.bn.bias", "Mixed_5c.branch3x3dbl_3.bn.running_mean", "Mixed_5c.branch3x3dbl_3.bn.running_var", "Mixed_5c.branch_pool.conv.weight", "Mixed_5c.branch_pool.bn.weight", "Mixed_5c.branch_pool.bn.bias", "Mixed_5c.branch_pool.bn.running_mean", "Mixed_5c.branch_pool.bn.running_var", "Mixed_5d.branch1x1.conv.weight", "Mixed_5d.branch1x1.bn.weight",
........
it reveal the the model cant match the net defined. Is there some mistake in the model I downloaded?Please enlighten me. Thank you very much!
@xiaomengyc
Hi, thanks for releasing the wonderful implementation of your work!
I noticed from this snippet since https://github.com/xiaomengyc/SPG/blob/master/exper/my_optim.py#L12, you try to multiply the lr for the last conv layer before GAP in the main branch by 10. But the model's parameters don't include one with 'cls' in its name, maybe 'classifier_1' should be considered?
Hi ,
I am running
python demo_image.py --image_name 'ILSVRC2012_val_00000004.JPEG'
and I am getting an error
Namespace(image_name='ILSVRC2012_val_00000004.JPEG', img_dir='examples/', input_size=321, num_classes=1000, save_dir='examples/results/', save_spg_c=True, snapshots='snapshots/imagenet_epoch_2_glo_step_128118.pth.tar', top_k=1)
Traceback (most recent call last):
File "demo_image.py", line 69, in <module>
model = load_model(args)
File "demo_image.py", line 39, in load_model
model = inceptionv3_spg.Inception3(num_classes=args.num_classes, threshold=0.5)
File "/home/rahul/ActiveShuttle/WSOL/ACOL_SPG/SPG-master/models/google/inception3_spg.py", line 93, in __init__
self.num_classes = args.num_classes
AttributeError: 'NoneType' object has no attribute 'num_classes'
Can anyone please help to find the problem ?
Thanks
Rahul
HI, can you provide the links to download the datasets? I am not sure which version of imagenet is used in this project.
For us to freely use your code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.