limbo0000 / PairLoss

Demo Code for paper 'When Deep Learning Meets Metric Learning: Remote Sensing Image Scene Classification via Learning Discriminative CNNs (TGRS)'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PairLoss

The implementation of PairLoss in When Deep Learning Meets Metric Learning: Remote Sensing Image Scene Classification via Learning Discriminative CNNs.

Compiling

You can follow these tutorial Caffe and link to compile your own caffe.

As is define in our paper, our PairLoss function:

$$J_{2}(X, W, B) = \sum_{i,j} max(0, (0.05 - y_{i,j} (\tau - ||O_{L}(x_i)-O_{L}(x_j)||_{2}^2)))$$

where $y_{i,j}=\begin{cases} +1 & y_{i} = y_{j} \-1 & y_{i} \not = y_{j} \\end{cases}$.

Therefore, our loss function needs four inputs which are divided into 2 groups.

One group calculates the loss of the inter-class, another calculates that of the intra-class.

If you utilize our loss function on your task, you can adopt a 4-stream siamese structure or slice operation.

Citation

@article{cheng2018deep,
  title={When Deep Learning Meets Metric Learning: Remote Sensing Image Scene Classification via Learning Discriminative CNNs},
  author={Cheng, Gong and Yang, Ceyuan and Yao, Xiwen and Guo, Lei and Han, Junwei},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  year={2018},
  publisher={IEEE}
}

About

Demo Code for paper 'When Deep Learning Meets Metric Learning: Remote Sensing Image Scene Classification via Learning Discriminative CNNs (TGRS)'


Languages

Language:Cuda 78.5%Language:C++ 21.5%