Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please help: Get {'all_avg_recall': 0.0, 'v_avg_recall': 0.0, 'i_avg_recall': 0.0} from hseq_eval.py #18

Open
GabbySuwichaya opened this issue Feb 14, 2020 · 2 comments

Comments

@GabbySuwichaya
Copy link

Thanks for releasing the code and I really enjoy reading your paper.

However, after I tried running hseq_eval.py with the following instruction:

python hseq_eval.py --function hseq_eval --config configs/hseq_eval.yaml

I received lots of warning which I am not sure if this is because of some incompatibility due to TF, or did I set something wrong.

I have installed all the prerequisite packages by with

$ cd contextdesc
$ pip install -r requirements.txt

However, I could not find the packages for opencv-python==3.4.2.16 and opencv-contrib-python==3.4.2.16. So, I installed opencv-python==3.4.2.17 and
opencv-contrib-python==3.4.2.17, instead.

So, just wonder if this is this ok? And is there anything else I have to install?

The full output messages look like this:

$ python hseq_eval.py --function hseq_eval --config configs/hseq_eval.yaml

WARNING:tensorflow:From /home/su-suwanwimolkul/contextdesc/utils/evaluator.py:26: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0214 18:20:32.112720 140594310276864 deprecation_wrapper.py:119] From /home/su-suwanwimolkul/contextdesc/utils/evaluator.py:26: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

`WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

`W0214 18:20:32.400682 140594310276864 lazy_loader.py:50]
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

WARNING:tensorflow:From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:225: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Use tf.keras.layers.Conv2Dinstead. W0214 18:20:32.400963 140594310276864 deprecation.py:323] From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:225: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version. Instructions for updating: Usetf.keras.layers.Conv2Dinstead. WARNING:tensorflow:From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor W0214 18:20:32.403049 140594310276864 deprecation.py:506] From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/ops/init_ops.py:1251: calling VarianceScaling.__init__ (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor WARNING:tensorflow:From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:403: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.BatchNormalization instead. In particular,tf.control_dependencies(tf.GraphKeys.UPDATE_OPS)should not be used (consult thetf.keras.layers.batch_normalizationdocumentation). W0214 18:20:32.574541 140594310276864 deprecation.py:323] From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:403: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.BatchNormalization instead. In particular,tf.control_dependencies(tf.GraphKeys.UPDATE_OPS)should not be used (consult thetf.keras.layers.batch_normalizationdocumentation). WARNING:tensorflow:From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:373: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. W0214 18:20:32.843710 140594310276864 deprecation.py:323] From /home/su-suwanwimolkul/contextdesc/models/cnn_wrapper/network.py:373: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.dense instead. WARNING:tensorflow:From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/util/dispatch.py:180: batch_gather (from tensorflow.python.ops.array_ops) is deprecated and will be removed after 2017-10-25. Instructions for updating:tf.batch_gatheris deprecated, please usetf.gatherwithbatch_dimsinstead. W0214 18:20:33.143327 140594310276864 deprecation.py:323] From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/util/dispatch.py:180: batch_gather (from tensorflow.python.ops.array_ops) is deprecated and will be removed after 2017-10-25. Instructions for updating:tf.batch_gatheris deprecated, please usetf.gatherwithbatch_dims instead. 2020-02-14 18:20:33.349879: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2020-02-14 18:20:33.373253: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 4200000000 Hz 2020-02-14 18:20:33.373589: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560ba56a4a70 executing computations on platform Host. Devices: 2020-02-14 18:20:33.373603: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined> WARNING:tensorflow:From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. W0214 18:20:33.411734 140594310276864 deprecation.py:323] From /home/su-suwanwimolkul/anaconda3/envs/ContextDesc-Env/lib/python3.5/site-packages/tensorflow/python/training/saver.py:1276: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version. Instructions for updating: Use standard file APIs to check for files with this prefix. INFO:tensorflow:Restoring parameters from pretrained/contextdesc++/model.ckpt-400000 I0214 18:20:33.412194 140594310276864 saver.py:1280] Restoring parameters from pretrained/contextdesc++/model.ckpt-400000 2020-02-14 18:20:33.471508: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.

``

@lzx551402
Copy link
Owner

  1. Thank you for pointing out the wrong dependencies, and I have updated requirements accordingly.

  2. Those warning messages raised from tensorflow2.0 would not affect this program.

  3. Did you configure configs/hseq_eval.yaml correctly? To use the pre-extracted keypoints, please leave suffix to _cvpr. Otherwise you may simply leave it empty to evaluate from scratch. You will be able to see something like this:

I0215 12:15:02.382030 139998341805888 saver.py:1284] Restoring parameters from pretrained/contextdesc++/model.ckpt-400000
2020-02-15 12:15:06.992330: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
2020-02-15 12:15:07.498549: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
0 v_abstract 0.8182284419682306
1 v_adam 0.8803200622186136
2 v_apprentices 0.9125884061453333
3 v_artisans 0.7532978162310019
4 v_astronautis 0.834236832593098
5 v_azzola 0.7433538034084249
6 v_bark 0.6238576094973912
7 v_bees 0.9546782656390992
8 v_beyus 0.6830293670376222
9 v_bip 0.8104020918066415
10 v_bird 0.7666802897475848
...

@GabbySuwichaya
Copy link
Author

GabbySuwichaya commented Feb 18, 2020

Thank you very much... Actually, the performance is very good.

Also, I would like to use your code on other datasets that also evaluate on different viewpoints and illumination. I will appropriately cite your work.

Since the code in image_matching.py provided in your repository is very easy to follow, I plan to use the image_matching.py to extract the features and save the extracted files.

Could you also provide the setting which could lead to the reported performance in HPatch dataset?

For example, how should I set up the following parameters in the image_matching.py :

  • n_sample
  • model_type
  • dense_desc
  • ratio_test
  • cross_check
  • reg_model_path
  • loc_model_path
  • aug_model_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants