Cuberick-Orion / CIRR

Official repository of ICCV 2021 - Image Retrieval on Real-life Images with Pre-trained Vision-and-Language Models
https://cuberick-orion.github.io/CIRR/
MIT License
100 stars 3 forks source link

problem in loading features #2

Closed maoyj1998 closed 3 years ago

maoyj1998 commented 3 years ago

Hello, CIRR is really a brilliant work !

now i am trying to load faster rcnn feature using pickle.load, I encounter some strange problems image

it is fine to load resnet 152 feature, searching for google dose not find any clue. image

Cuberick-Orion commented 3 years ago

Hi,

Thank you for your interest in our work.

To load the frcnn feature files, try:

>>> t = torch.load("train-10108-1-img1.pkl")
>>> t
tensor([[1.0865, 0.2140, 0.0000,  ..., 0.9983, 0.9057, 0.6898],
        [0.5224, 0.1632, 0.0000,  ..., 0.9983, 0.9986, 0.5074],
        [1.7256, 0.1266, 0.0000,  ..., 0.7811, 0.9856, 0.7811],
        ...,
        [0.0000, 0.0000, 0.0000,  ..., 0.9123, 0.1017, 0.2781],
        [0.0031, 0.3650, 0.7746,  ..., 0.9518, 0.4058, 0.4366],
        [0.0000, 0.0000, 0.0255,  ..., 0.8832, 0.1104, 0.3534]])

We have just verified the above code. Please do confirm if it works for you.

In a subsequent update (coming soon), we will update our code base to include the support for frcnn features (which requires just a few changes).

Thanks.

maoyj1998 commented 3 years ago

Hi,

Thank you for your interest in our work.

To load the frcnn feature files, try:

>>> t = torch.load("train-10108-1-img1.pkl")
>>> t
tensor([[1.0865, 0.2140, 0.0000,  ..., 0.9983, 0.9057, 0.6898],
        [0.5224, 0.1632, 0.0000,  ..., 0.9983, 0.9986, 0.5074],
        [1.7256, 0.1266, 0.0000,  ..., 0.7811, 0.9856, 0.7811],
        ...,
        [0.0000, 0.0000, 0.0000,  ..., 0.9123, 0.1017, 0.2781],
        [0.0031, 0.3650, 0.7746,  ..., 0.9518, 0.4058, 0.4366],
        [0.0000, 0.0000, 0.0255,  ..., 0.8832, 0.1104, 0.3534]])

We have just verified the above code. Please do confirm if it works for you.

In a subsequent update (coming soon), we will update our code base to include the support for frcnn features (which requires just a few changes).

Thanks.

A grate thanks