chenhsuanlin / inverse-compositional-STN

Inverse Compositional Spatial Transformer Networks :performing_arts: (CVPR 2017 oral)
MIT License
318 stars 63 forks source link

Support for RGB images? #3

Closed xinghedyc closed 7 years ago

xinghedyc commented 7 years ago

Thanks for sharing such great work, Does IC-STN support RGB images as inputs?

chenhsuanlin commented 7 years ago

Yes - if you want to modify from the existing code, the main steps are

  1. change the shape of imageRawBatch to [None,28,28,3] in train.py L58
  2. change the corresponding convolution kernel dimensions
  3. comment out data.py L85 (as imageBatch is already 4-D)
  4. change the last dimension to 3 in graph.py L81,83

RGB inputs should work after these steps. Let me know if you have other questions!

xinghedyc commented 7 years ago

@ericlin79119 Thanks a lot for your quick reply! I'll try it.