Giter Club home page Giter Club logo

spg's Introduction

spg's People

Contributors

xiaomengyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spg's Issues

When I trained the CUB datebase,I got this result.Why top-1 and top_5 is 0?

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'

Localization metric

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!

A mistake in the code

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

backbone architecture?

@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

The problem of pre_train model

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!

AttributeError: 'NoneType' object has no attribute 'num_classes'

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

About the dataset

HI, can you provide the links to download the datasets? I am not sure which version of imagenet is used in this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.