nashory / DeLF-pytorch

PyTorch Implementation of "Large-Scale Image Retrieval with Attentive Deep Local Features"
MIT License
343 stars 63 forks source link

What's mean of receptive field, stride and padding of FeatureExtractor class in extractor.py? #22

Open CTianyou opened 4 years ago

CTianyou commented 4 years ago

I wanna extract delf with another network.How to set receptive field, stride and padding of FeatureExtractor class in extractor.py?

AbyssGaze commented 4 years ago

Maybe you could set on feeder.py:Feeder as:

        if delf_config.arch in ['resnet18']:
            if self.target_layer in ['layer3']:
                self.fmap_depth = 256
                self.rf = 211  # 291.0
                self.stride = 16.0
                self.padding = 105.0
            elif self.target_layer in ['layer4']:
                self.fmap_depth = 512
                self.rf = 435.0
                self.stride = 32.0
                self.padding = 217.0