peace195 / sppnet

Spatial Pyramid Pooling on top of AlexNet using tensorflow. ***New updates for SPPnet in Pytorch**
https://peace195.github.io/spatial-pyramid-pooling/
131 stars 43 forks source link

About the SPP layer #2

Open WanliOuyang opened 6 years ago

WanliOuyang commented 6 years ago

TypeError: Expected binary or unicode string , got None in line: spp = tf.reshape(max_pool, [num_sample, -1]) How to resolve it ?

peace195 commented 6 years ago

Which tensorflow version do you use?

You should use tensorflow version 1.4.0 or higher.

WanliOuyang commented 6 years ago

ok, My tensorflow version 1.1.0. maybe is lower.

WanliOuyang commented 6 years ago

How should the code be modified if it runs on a relatively low version of tensorflow? Thanks

peace195 commented 6 years ago

You can search the structure of tf.reshape function in tensorflow 1.1.0 then modify my code using this structure.

Anyway, you should upgrade your tensorflow to newest version and prepare the dataset carefully.

WanliOuyang commented 6 years ago

Is the model able to ascend to the pool of 3D data? for example, videos

peace195 commented 6 years ago

Only 2D data.

Best regards,

Binh Do

WanliOuyang commented 6 years ago

@peace195 When I use a fixed batch size value(such as batch_size=4), the code can run, but when training, the precision of the training keeps fluctuating on a very small number(such as the mean accuracy is 0.16). Why is this?

peace195 commented 6 years ago

@WanliOuyang I'm so sorry because I was busy these days. Did you solve that problem? I'm very appreciated that you might help me to fix it. I think you can try with large batch size and small learning rate.

CXSunshine commented 6 years ago

I also want to use this to deal with 3D data.I am confused with the input of the SPP(such as the size of the imag)

hbb21st commented 6 years ago

Hi, many thanks for your code, I have a small question about the way deal with your x = tf.placeholder('float', shape = x_train.get_shape()), as TRAINING_ITERATIONS going on, the leaking mem happens and memory usage quickly increase, how you overcome it?

world2025 commented 6 years ago

Hi,thanks for your code,do you use the multi_scale image inputs in your experiment?

peace195 commented 6 years ago

Yes, I do.

On Fri, Jul 20, 2018, 2:58 PM tkone2018 notifications@github.com wrote:

Hi,thanks for your code,do you use the multi_scale image inputs in your experiment?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/peace195/sppnet/issues/2#issuecomment-406593253, or mute the thread https://github.com/notifications/unsubscribe-auth/AIlTsi68UCra5wTHH_l5fHKwB9N6gMeSks5uIdQOgaJpZM4SzAis .

world2025 commented 6 years ago

Ok,thank you.I want to use like this network to realize the image retrieval ,but I don't know how to build my own network ,can you help me ? Thank you very much.

peace195 commented 6 years ago

Sorry about my lack of help. But I have a suggestion that you should use Pytorch with batch_size = 1 for using multi-size images as inputs.

On Fri, Jul 20, 2018, 3:14 PM tkone2018 notifications@github.com wrote:

Ok,thank you.I want to use like this network to realize the image retrieval ,but I don't know how to build my own network ,can you help me ? Thank you very much.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/peace195/sppnet/issues/2#issuecomment-406597032, or mute the thread https://github.com/notifications/unsubscribe-auth/AIlTsjg7VxvKCdcfaNK5j9k9fbjvVKK1ks5uIdedgaJpZM4SzAis .

world2025 commented 6 years ago

Ok, thank you

world2025 commented 6 years ago

Hello, h_strd =math.floor(float(previous_conv_size[0]) / out_pool_size[i]) w_strd = math.floor(float(previous_conv_size[1]) / out_pool_size[i]) the stride size should be math.floor not math.ceil acoording to the Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition paper.Maybe you think math.ceil is also right.

ProjectDimlight commented 6 years ago

Hello, I suggest that the shape of the tf.nn.max_pool in the for-loop should be: ksize = [1, h_size, w_size, 1] instead of : ksize = [1, h_size, h_size, 1] As the input is always in the shape of a square, this might not be a big issue, but somehow confusing?

zjz5250 commented 4 years ago

hello,can the input data hava different shape?

peace195 commented 4 years ago

@zjz5250 zj Yes.

zjz5250 commented 4 years ago

  Thanks for  your replay!!!        but  I mean that  can I   train the model using data with different shape?      when  build the  network model,the  input data shape  must be  specified,isn't it? 

------------------ 原始邮件 ------------------ 发件人: "Binh Do"<notifications@github.com>; 发送时间: 2020年1月6日(星期一) 上午10:41 收件人: "peace195/sppnet"<sppnet@noreply.github.com>; 抄送: "JunZ翟"<81467372@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [peace195/sppnet] About the SPP layer (#2)

@zjz5250 zj Yes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.