项目作者: yuantangliang

项目描述 :
the loss function in Aritcal ‘Focal Loss for Dense Object Detection‘’
高级语言: C++
项目地址: git://github.com/yuantangliang/softmaxfocalloss.git
创建时间: 2017-08-17T07:16:45Z
项目社区:https://github.com/yuantangliang/softmaxfocalloss

开源协议:MIT License

下载


softmaxfocalloss

the focal loss in Aritcal Focal Loss for Dense Object Detection

Code is test on MxNet 0.11.0

Installation

  1. Clone the softmaxfocalloss repository, and we’ll call the directory that you cloned softmaxfocalloss as ${FOCAL_LOSS_ROOT}.

    1. git clone https://github.com/yuantangliang/softmaxfocalloss.git
  2. Install MXNet:

    3.1 Clone MXNet and checkout to MXNet by

    1. git clone --recursive https://github.com/dmlc/mxnet.git
    2. git submodule update

    3.2 Copy operators in $(FOCAL_LOSS_ROOT)/source/softmaxfocal_output.xxx by

    1. cp -r $(FOCAL_LOSS_ROOT)/source/* $(MXNET_ROOT)/src/operator/contrib/

    3.3 Compile MXNet

    1. cd ${MXNET_ROOT}
    2. make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1

    3.4 Install the MXNet Python binding by

    1. cd python
    2. sudo python setup.py install

Test

  1. run test function to make sure everything is ok by
    1. cd $(FOCAL_LOSS_ROOT)
    2. python softmaxfocaltest.py