All Projects → HiKapok → Psroialign

HiKapok / Psroialign

Licence: mit
(Oriented) PsRoIAlign Operation In Tensorflow C++ API

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Psroialign

Ssd.tensorflow
State-of-the-art Single Shot MultiBox Detector in Pure TensorFlow, QQ Group: 758790869
Stars: ✭ 334 (+610.64%)
Mutual labels:  faster-rcnn
Fchd Fully Convolutional Head Detector
Code for FCHD - A fast and accurate head detector
Stars: ✭ 555 (+1080.85%)
Mutual labels:  faster-rcnn
Keras Faster Rcnn
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Stars: ✭ 28 (-40.43%)
Mutual labels:  faster-rcnn
Pytorchnethub
项目注释+论文复现+算法竞赛
Stars: ✭ 341 (+625.53%)
Mutual labels:  faster-rcnn
Detecto
Build fully-functioning computer vision models with PyTorch
Stars: ✭ 445 (+846.81%)
Mutual labels:  faster-rcnn
Faster Rcnn.pytorch
A faster pytorch implementation of faster r-cnn
Stars: ✭ 6,659 (+14068.09%)
Mutual labels:  faster-rcnn
Faster rcnn for dota
Code used for training Faster R-CNN on DOTA
Stars: ✭ 283 (+502.13%)
Mutual labels:  faster-rcnn
Bottom Up Attention
Bottom-up attention model for image captioning and VQA, based on Faster R-CNN and Visual Genome
Stars: ✭ 989 (+2004.26%)
Mutual labels:  faster-rcnn
R2cnn faster Rcnn tensorflow
Rotational region detection based on Faster-RCNN.
Stars: ✭ 548 (+1065.96%)
Mutual labels:  faster-rcnn
Keras object detection
Convert any classification model or architecture trained in keras to an object detection model
Stars: ✭ 28 (-40.43%)
Mutual labels:  faster-rcnn
Pedestron
[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. On ArXiv 2020
Stars: ✭ 352 (+648.94%)
Mutual labels:  faster-rcnn
Kittibox
A car detection model implemented in Tensorflow.
Stars: ✭ 388 (+725.53%)
Mutual labels:  faster-rcnn
Tffrcnn
FastER RCNN built on tensorflow
Stars: ✭ 898 (+1810.64%)
Mutual labels:  faster-rcnn
Rectlabel Support
RectLabel - An image annotation tool to label images for bounding box object detection and segmentation.
Stars: ✭ 338 (+619.15%)
Mutual labels:  faster-rcnn
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (+1989.36%)
Mutual labels:  faster-rcnn
Simple Faster Rcnn Pytorch
A simplified implemention of Faster R-CNN that replicate performance from origin paper
Stars: ✭ 3,422 (+7180.85%)
Mutual labels:  faster-rcnn
Cv Papers
计算机视觉相关论文整理、记录、分享; 包括图像分类、目标检测、视觉跟踪/目标跟踪、人脸识别/人脸验证、OCR/场景文本检测及识别等领域。欢迎加星,欢迎指正错误,同时也期待能够共同参与!!! 持续更新中... ...
Stars: ✭ 738 (+1470.21%)
Mutual labels:  faster-rcnn
Unreal caffe
Self Maintained Caffe. In this version Faster-RCNN, RFCN needs layer are fully supported!
Stars: ✭ 38 (-19.15%)
Mutual labels:  faster-rcnn
Traffic Light Detector
Detect traffic lights and classify the state of them, then give the commands "go" or "stop".
Stars: ✭ 37 (-21.28%)
Mutual labels:  faster-rcnn
Faster Rcnn Cplusplus2
faster-rcnn c++ python model
Stars: ✭ 14 (-70.21%)
Mutual labels:  faster-rcnn

PsRoIAlign Operation In Tensorflow C++ API

PsRoIAlign involves interpolation techniques for PsRoiPooling (position-sensitive RoI pooling operation), the interpolation idea is proposed in RoIAlign to avoid any quantization of the RoI boundaries. The first adoption of PsRoIAlign might be in this paper Light-Head R-CNN: In Defense of Two-Stage Object Detector.

You can find more details about the RoiPooling technique in Fast R-CNN and Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition.

This repository contains code of the implement of PsRoIAlign operation in Tensorflow C++ API. You can use this operation in many popular two-stage object detector. Both research work using PsRoIAlign and contribution to this repository are welcomed.

For using this op in your own machine, just following these steps:

  • copy the header file "cuda_config.h" from "your_python_path/site-packages/external/local_config_cuda/cuda/cuda/cuda_config.h" to "your_python_path/site-packages/tensorflow/include/tensorflow/stream_executor/cuda/cuda_config.h".

  • run the following script:

mkdir build
cd build && cmake ..
make
  • run "test_op.py" and check the numeric errors to test your install

  • follow the below codes snippet to integrate this Op into your own code:

     op_module = tf.load_op_library(so_lib_path)
     ps_roi_align = op_module.ps_roi_align
    
     @ops.RegisterGradient("PsRoiAlign")
     def _ps_roi_align_grad(op, grad, _):
       '''The gradients for `PsRoiAlign`.
       '''
       inputs_features = op.inputs[0]
       rois = op.inputs[1]
       pooled_features_grad = op.outputs[0]
       pooled_index = op.outputs[1]
       grid_dim_width = op.get_attr('grid_dim_width')
       grid_dim_height = op.get_attr('grid_dim_height')
     
       return [op_module.ps_roi_align_grad(inputs_features, rois, grad, pooled_index, grid_dim_width, grid_dim_height, pool_method), None]
    
     pool_method = 'max' # or 'mean'
     pool_result = ps_roi_align(features, rois, 2, 2, pool_method)
    

The code is tested under TensorFlow 1.6 with CUDA 8.0 using Ubuntu 16.04. This PsRoIAlign Op had been used to train Xception based Light-Head RCNN successfully with performance at ~75%mAP on PASCAL VOC 2007 Test dataset, you can see codes here.

Update:

  • Added support for mean pooling (default is max pooling)
  • PsRoIAlign now support oriented RoI inputs (for both max and mean pooling).

Future Work:

  • Check if there is need to ensure the convex of polygon
  • Improve performance

If you encountered some linkage problem when generating or loading *.so, you are highly recommended to read this section in the official tourial to make sure you were using the same C++ ABI version.

The MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].