-
Notifications
You must be signed in to change notification settings - Fork 65
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
Output does not correspond #1
Comments
Dear Alberto, thanks for raising this issue. Unfortunately, I will not be able to look into this right away. We had this code tested with Tensorflow 1.4.1 and 1.6.0, I hope it's not an issue with the Tensorflow version... It's encouraging that the error happens so early in the network though. It looks like in the very first layer. I don't remember any more whether this is average image normalization or the first convolution. See https://github.com/uzh-rpg/netvlad_tf_open/blob/master/tests/test_net_from_mat.py#L42-L48 If you'd have some time, could you maybe increase the 18s to 28s or something in https://github.com/uzh-rpg/netvlad_tf_open/blob/master/tests/test_net_from_mat.py#L47 and repost the output? That should give a clue whether it's image normalization ( https://github.com/uzh-rpg/netvlad_tf_open/blob/master/python/netvlad_tf/net_from_mat.py#L37-L41 ) or convolution. Thanks! |
Annoying. Thanks for figuring this out! |
Hi, @AlbertoJaenal I meet the same problem too. Do you have any advice to solve that, or just ignore it? Thanks a lot. |
Hi @Mendel1, I just ignored it. |
when I run the code, meet the problem as this, do you have any advice ti slove that? 2019-04-06 11:42:06.680233: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10415 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:03:00.0, compute capability: 6.1)
|
Hi @AlbertoJaenal. I meet the same problem and I don't understand why you ignore it. I think if the image RGB values loaded in python are different from those loaded in matlab but network parameters are same, NetVLAD-TF representations are actually wrong, are not? The right way is to use correct python image loader? |
Hi, @dontLoveBugs, as I inderstand this issue, the only problem derived from the different conversion is that the performance of the net will drop when comparing images loaded from Python with images loaded from Matlab. But as the problem only relies in little differences at pixel level when reading, the performance of the net won't suffer too much when comparing images read with the same method. After all, the net outputs a whole-image representation based on appearance, so slightly different inputs will have slightly different outputs, but the high level features will be practically the same, as the net parameters have millions of parameters that I suppose robust to this little "nosie". I think this is a similar issue than transferring a model between different frameworks (TensorFlow, PyTorch...). The weights and the operations in the inference stage will be slightly different, but the performances of the different implementations are still similar. I can assure you that I have used the descriptors of this implementation of NetVLAD with very satisfactory results (reading the images with Python methods). But if you are not totally sure of its performance, you can read the images Matlab-wise and then use this network. Hope this will help you! |
@dontLoveBugs so you consider P.S.: It's interesting to think that switching the underlying libjpeg library results in an adversarial attack on NetVLAD!: |
I met the same errors.Have you solved it? |
How did you get structed.mat? Looking forward to your reply |
Hello. First, thanks for your contribution with this repo.
I downloaded it a couple days ago and I began to try. As you suggest, I ran the matlab scripts in order to get the checkpoint. I am using the vd16_pitts30k_conv5_3_vlad_preL2_intra_white model, so I did not need to make any changes in the scripts. I got my structed.mat and the followed the steps. So, I ran the
test_net_from_mat.py script, and the output became this:
I also ran the test_nets.py and the output was this:
I have been comparing the descriptor of some images to the descriptor extracted by the matlab implementation and it is very different. Am I missing something?
I have also downloaded the checkpoint given, and the results are the same. It seems like somewhere the implementations are different. I have also tried to run the graph from the .meta file and also from your file. The results are always the same. It seems like there is something in which Tensorflow and Matconvnet differ.
I have Tensorflow 1.8.0
Thanks in advance
The text was updated successfully, but these errors were encountered: