cvlab-epfl / LIFT

Code release for the ECCV 2016 paper
485 stars 168 forks source link

Cannot run.sh #37

Closed mpkuse closed 6 years ago

mpkuse commented 6 years ago

Hi, I am able to compile all your source code.

However as I try to run.sh I get following error:

[mpkuse@deephorse LIFT]$ ./run.sh 
Parameters
#--------------------------------------------------------------------------------------
# Be careful as we do not use sophisticated parsing
# The parser will read until the semicolon
# 
# types are defined as below
# ss: multiple strings separated with commas
# s: string
# b: boolean
# f: float
# d: int
#--------------------------------------------------------------------------------------

#--------------------------------------------------------------------------------------
# Dataset parameters
ss: dataset.trainSetList = ECCV/piccadilly/; # All the first images of oxford dataset is used for training
s: dataset.dataType = ECCV;   # the dataset type

#--------------------------------------------------------------------------------------
# Model parameters
s: model.modelType = Combined;    # the network type
b: model.bNormalizeInput = 1;     # Normalize input to have zero mean and 1 std
f: model.fScaleList = np.array([1.0]);       # list of scale spaces (small means larger scale)

# GHH related
f: model.max_strength = -1; # GHH softmax strength (-1 for hard)

# Keypoints
s: model.sDetector = tilde;    # network architecture for kp
d: model.nFilterSize = 25;    # Let's keep the number odd
d: model.nPatchSizeKp = 48;       # patch size for kp including moving
                  # regions we use something smaller
s: model.sKpNonlinearity = None; # use nonlinearity at end
f: model.fScaleList = np.array([1.0]);       # list of scale spaces (small means larger scale)
f: model.bias_rnd = 0.0;        # random noise added to bias
f: model.epsilon = 1e-8;        # epsilon for tilde

# Orientation
s: model.sOrientation = cvpr16;    # network architecture for orientation

# Descriptor
s: model.sDescriptor = descriptor_imported;    # network architecture for desc
d: model.nDescInputSize = 64;     # Input size to be fed to the descriptor
# s: model.descriptor_export_folder = /cvlabdata1/home/trulls-data/kpdesc/torch/export/; 
  L-> skipped
s: model.descriptor_model = new-CNN3-picc-iter-56k.h5; # network configuration
s: model.descriptor_input = desc-input;  # Descriptor input

#--------------------------------------------------------------------------------------
# Parameters for patch extraction

# automatically determined
f: patch.fMaxScale = np.max(self.model.fScaleList); # asserts make sure this is stored properly
f: patch.fRatioScale = (self.model.nPatchSizeKp / 2.0) / 2.0;   # to not resize when scale is 2
d: patch.nPatchSize = np.round(self.model.nDescInputSize * self.patch.fRatioScale / 6.0); # the large patch size for data. the desc will look at ratio scale of 6.0

#--------------------------------------------------------------------------------------
# Validation and test time parameters
d: validation.batch_size = 100;     # batch size of the implementation

# d: validation.nScaleInterval = 4;
  L-> skipped
# d: validation.nNMSInterval = 2;     # number of intervals we look for
  L-> skipped
#                 # NMS (3 would mean it goes up one
#                 # octave in case of
#                 # nScaleInterval=2)
#---------------------------------------------------------------------------------
Time taken to read and prepare the image is 189.155 ms
INFO: Testing double scale
resize to test is [ 1.95833333  1.70482819  1.48413914  1.29201816  1.12476714  0.97916667
  0.85241409  0.74206957  0.64600908  0.56238357  0.48958333  0.42620705
  0.37103478  0.32300454  0.28119178  0.24479167  0.21310352  0.18551739
  0.16150227  0.14059589  0.12239583]
scales to test is [  1.           1.14869835   1.31950791   1.51571657   1.74110113   2.
   2.29739671   2.63901582   3.03143313   3.48220225   4.           4.59479342
   5.27803164   6.06286627   6.96440451   8.           9.18958684
  10.55606329  12.12573253  13.92880901  16.        ]
Time taken to resize image is 24.637ms
Traceback (most recent call last):
  File "compute_detector.py", line 215, in <module>
    image, verbose=False)
  File "/home/mpkuse/Downloads/LIFT/python-code/Utils/solvers.py", line 148, in TestImage
    myNet = CreateNetwork4Image(pathconf, param, image, verbose=verbose)
  File "/home/mpkuse/Downloads/LIFT/python-code/Utils/solvers.py", line 93, in CreateNetwork4Image
    ) + '_' + param.model.modelType.lower())
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/mpkuse/Downloads/LIFT/python-code/Utils/networks/eccv_combined.py", line 45, in <module>
    import theano
  File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 88, in <module>
    from theano.configdefaults import config
  File "/usr/local/lib/python2.7/dist-packages/theano/configdefaults.py", line 137, in <module>
    in_c_key=False)
  File "/usr/local/lib/python2.7/dist-packages/theano/configparser.py", line 287, in AddConfigVar
    configparam.__get__(root, type(root), delete_key=True)
  File "/usr/local/lib/python2.7/dist-packages/theano/configparser.py", line 335, in __get__
    self.__set__(cls, val_str)
  File "/usr/local/lib/python2.7/dist-packages/theano/configparser.py", line 346, in __set__
    self.val = self.filter(val)
  File "/usr/local/lib/python2.7/dist-packages/theano/configdefaults.py", line 116, in filter
    'You are tring to use the old GPU back-end. '
ValueError: You are tring to use the old GPU back-end. It was removed from Theano. Use device=cuda* now. See https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29 for more information.
Parameters

Do you know how can I fix this and run your code?

kmyi commented 6 years ago

It's because of the last line. This code is quite old and relied on Theano 0.9 if I recall correctly. You can see that import theano failed here.

mpkuse commented 6 years ago

right! Is there anyway I can still run your code to see the results?

kmyi commented 6 years ago

You'll have to install the old version of Theano. Please search for how to do that. It's not going to be straightforward, but it's possible. You'll need to create an environment specific to that, as it will also require old cudnn. Closing the issue as it is a environment setup issue.