Skip to content

guopei/CompactBiPooling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compact Bilinear Pooling for Torch

This code is revised from @jnhwkim's Multimodal Compact Bilinear Pooling for Torch7. The main changes include:

  1. adapt the code with image inputs(4D tensor).
  2. get rid of spectral-lib dependency.
  3. the new package name is tcbp(Torch Compact Bilinear Pooling) to avoid confusion.
  4. new tests.

The compact bilinear pooling layer is proposed by Yang Gao etc. in the paper Compact Bilinear Pooling. This method reduces the spatial complexity of Bilinear Pooling so that it's feasible for real world training and provides a possible direction to interpret the huge success in fine grained recognition using Bilibear Pooling. We refer you to caffe implementation page for further information.

Installation

git clone https://github.com/guopei/CompactBiPooling cbp
cd cbp
luarocks make rocks/tcbp-1.0-1.rockspec

Test

th test.lua

Read test.lua for usage.

Troubleshooting

If the following error occurs:

ld -lcufft not found

This is because the ld cannot find the cufft library even if you have already set the LD_LIBRARY_PATH. Because LD_LIBRARY_PATH is only used at excution time not compilation time. The solution is just adding a soft link of libcufft.so to your system library path:

sudo ln -s /user/local/cuda/lib64/libcufft.so /user/lib

Change the location of libcufft.so according to where its' located in your machine.

Update

  1. Added code to be compatible with both lua51 and lua52.

References

  1. spectral-lib
  2. cbp
  3. compact_bilinear_pooling
  4. tensorflow_compact_bilinear_pooling

About

Compact Bilinear Pooling Implementation. (Torch)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published