Coder Social home page Coder Social logo

sungonce / senet Goto Github PK

View Code? Open in Web Editor NEW
52.0 3.0 2.0 1.78 MB

Official PyTorch Implementation of Revisiting Self-Similarity: Structural Embedding for Image Retrieval, CVPR 2023

Python 100.00%
cvpr cvpr2023 image-retrieval image-retrieval-papers senet structural-embedding-networks

senet's Issues

AssertionError: The model is not fully loaded.

Hi! Nice work.
When I ran python test.py SENET.RESNET_DEPTH 101 TEST.WEIGHTS pretrained_weights/SENet_R101_con.pt TEST.DATA_DIR datadir_examples
There was a mismatching error between weight_dict and state_dict. That is why I wasn't able to load the checkpoint


Traceback (most recent call last):
  File "test.py", line 16, in <module>
    main()
  File "test.py", line 13, in main
    SENet_tester.__main__()
  File "/mount/sdc2_10TB/harry/tensorboard_embeddings/SENet/core/SENet_tester.py", line 30, in __main__
    checkpoint.load_checkpoint(cfg.TEST.WEIGHTS, model)
  File "/mount/sdc2_10TB/harry/tensorboard_embeddings/SENet/core/checkpoint.py", line 45, in load_checkpoint
    raise AssertionError("The model is not fully loaded.")
AssertionError: The model is not fully loaded.

@sungonce

Pytorch Verison

"What version of PyTorch are you using? My testing version may be different from the version of your pre-trained model, which could lead to code execution issues."

small fix

trans_fun = "basic_transform"

class ResStage_basetransform(nn.Module):
"""Stage of ResNet."""

def __init__(self, w_in, w_out, stride, d, w_b=None, num_gs=1):
    super(ResStage_basetransform, self).__init__()      # <------------------------
    for i in range(d):
        b_stride = stride if i == 0 else 1
        b_w_in = w_in if i == 0 else w_out
        trans_fun = get_trans_fun("basic_transform")      # <------------------------
        res_block = ResBlock(b_w_in, w_out, b_stride, trans_fun, w_b, num_gs)
        self.add_module("b{}".format(i + 1), res_block)

def forward(self, x):
    for block in self.children():
        x = block(x)
    return x

Custom dataset

What are the values of dataset and gnd_fn for a custom dataset?

        if dataset == 'roxford5k':
            gnd_fn = 'gnd_roxford5k.pkl'
        elif dataset == 'rparis6k':
            gnd_fn = 'gnd_rparis6k.pkl'
        else:
            assert dataset

About train

I feel your work is very good. Do you plan to upload training code in the future? Looking forward to your reply

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.