DetectionTeamUCAS - R2CNN_Faster-RCNN_Tensorflow

DetectionTeamUCAS - R2CNN_Faster-RCNN_Tensorflow

https://github.com/DetectionTeamUCAS/R2CNN_Faster-RCNN_Tensorflow

Rotational region detection based on Faster-RCNN.

rotational [ro'teʃənl]:adj. 转动的,回转的,轮流的
University of Chinese Academy of Sciences,UCAS:中国科学院大学,国科大
exactly [ɪɡˈzæktli]:adv. 精确地,准确地,确切地,究竟,到底,一点不错,正是如此,完全正确

R2CNN_Faster_RCNN_Tensorflow

1. Abstract

This is a tensorflow re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection. It should be noted that we did not re-implementate exactly as the paper and just adopted its idea.

Faster-RCNN_Tensorflow
https://github.com/DetectionTeamUCAS/Faster-RCNN_Tensorflow

2. DOTA test results

在这里插入图片描述

3. Comparison

DOTA: A Large-scale Dataset for Object Detection in Aerial Images

3.1 Task1 - Oriented Leaderboard

ApproachesmAPPLBDBRGTFSVLVSHTCBCSTSBFRAHASPHC
SSD10.5939.839.090.6413.180.260.391.1116.2427.579.2327.169.093.031.051.01
YOLOv221.3939.5720.2936.5823.428.852.094.8244.3438.3534.6516.0237.6247.2325.57.45
R-FCN26.7937.838.213.6437.266.742.65.5922.8546.9366.0433.3747.1510.625.1917.96
FR-H36.2947.16619.851.7414.8712.86.8856.2659.9757.3247.8348.78.2337.2523.05
FR-O52.9379.0969.1217.1763.4934.237.1636.289.1969.658.9649.452.5246.6944.846.3
R2CNN60.6780.9465.7535.3467.4459.9250.9155.8190.6766.9272.3955.0652.2355.1453.3548.22
RRPN61.0188.5271.2031.6659.3051.8556.1957.2590.8172.8467.3856.6952.8453.0851.9453.58
ICN68.2081.4074.3047.7070.3064.9067.8070.0090.8079.1078.2053.6062.9067.0064.2050.20
R2CNN++71.1689.6681.2245.5075.1068.2760.1766.8390.9080.6986.1564.0563.4865.3468.0162.05

3.2 Task2 - Horizontal Leaderboard

ApproachesmAPPLBDBRGTFSVLVSHTCBCSTSBFRAHASPHC
SSD10.9444.7411.216.226.91210.2411.3415.5912.5617.9414.734.554.550.531.01
YOLOv239.276.933.8722.7334.8838.7332.0252.3761.6548.5433.9129.2736.8336.4438.2611.61
R-FCN47.2479.3344.2636.5853.5339.3834.1547.2945.6647.7465.8437.9244.2347.2350.6434.9
FR-H60.4680.3277.5532.8668.1353.6652.4950.0490.4175.0559.595749.8161.6956.4641.85
R2CNN----------------
FPN72.0088.7075.1052.6059.2069.4078.8084.5090.6081.3082.6052.5062.1076.6066.3060.10
ICN72.5090.0077.7053.4073.3073.5065.0078.2090.8079.1084.8057.2062.1073.5070.2058.10
R2CNN++75.3590.1881.8855.3073.2972.0977.6578.0690.9182.4486.3964.5363.4575.7778.2160.11

4. Face Detection

Environment: NVIDIA GeForce GTX 1060

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

5. ICDAR2015

在这里插入图片描述

6. Requirements

TensorFlow >= 1.2
CUDA 8.0
Python 2.7
OpenCV (cv2)

strong@foreverstrong:~$ python --version
Python 2.7.12
strong@foreverstrong:~$ 
strong@foreverstrong:~$ pip list | grep opencv
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
opencv-python                      3.4.1.15   
You are using pip version 18.0, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
strong@foreverstrong:~$ 
strong@foreverstrong:~$ pip list | grep tensorflow
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
tensorflow-gpu                     1.4.0      
tensorflow-tensorboard             0.4.0      
You are using pip version 18.0, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
strong@foreverstrong:~$ 
strong@foreverstrong:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
strong@foreverstrong:~$ 
strong@foreverstrong:~$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> import tensorflow
>>> 
>>> cv2.__version__
'3.4.1'
>>> 
>>> tensorflow.__path__
['/usr/local/lib/python2.7/dist-packages/tensorflow']
>>> 
>>> tensorflow.__version__
'1.4.0'
>>> 
>>> exit()
strong@foreverstrong:~$ 
strong@foreverstrong:~/tensorflow_work$ git clone https://github.com/DetectionTeamUCAS/R2CNN_Faster-RCNN_Tensorflow.git
Cloning into 'R2CNN_Faster-RCNN_Tensorflow'...
remote: Enumerating objects: 641, done.
remote: Total 641 (delta 0), reused 0 (delta 0), pack-reused 641
Receiving objects: 100% (641/641), 281.37 MiB | 3.57 MiB/s, done.
Resolving deltas: 100% (272/272), done.
Checking connectivity... done.
strong@foreverstrong:~/tensorflow_work$ 

7. Download Model

  1. Please download resnet50_v1, resnet101_v1 pre-trained models on Imagenet, put it to data/pretrained_weights.
    resnet50_v1: http://download.tensorflow.org/models/resnet_v1_50_2016_08_28.tar.gz
    resnet101_v1: http://download.tensorflow.org/models/resnet_v1_101_2016_08_28.tar.gz

  2. Please download mobilenet_v2 pre-trained model on Imagenet, put it to data/pretrained_weights/mobilenet.
    mobilenet_v2: https://storage.googleapis.com/mobilenet_v2/checkpoints/mobilenet_v2_1.0_224.tgz

  3. Please download trained model by this project, put it to output/trained_weights.
    trained model: https://github.com/DetectionTeamUCAS/Models/tree/master/R2CNN_Faster-RCNN_Tensorflow

/home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights

strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights$ ls -l
total 8
drwxrwxr-x 2 strong strong 4096 Jun 25  2018 FasterRCNN_20180623_FDDB_mobile_v1
-rw-rw-r-- 1 strong strong  152 Jul 20 09:17 README.md
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights$ 
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights$ cd FasterRCNN_20180623_FDDB_mobile_v1/
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights/FasterRCNN_20180623_FDDB_mobile_v1$ ll
total 23896
drwxrwxr-x 2 strong strong     4096 Jun 25  2018 ./
drwxrwxr-x 3 strong strong     4096 Jul 21 18:59 ../
-rw-rw-r-- 1 strong strong       45 Jun 25  2018 checkpoint
-rw-rw-r-- 1 strong strong 22002712 Jun 25  2018 voc_200000model.ckpt.data-00000-of-00001
-rw-rw-r-- 1 strong strong    14893 Jun 25  2018 voc_200000model.ckpt.index
-rw-rw-r-- 1 strong strong  2434234 Jun 25  2018 voc_200000model.ckpt.meta
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights/FasterRCNN_20180623_FDDB_mobile_v1$ 

9. Compile

cd $PATH_ROOT/libs/box_utils/
python setup.py build_ext --inplace
cd $PATH_ROOT/libs/box_utils/cython_utils
python setup.py build_ext --inplace
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils$ python setup.py build_ext --inplace
running build_ext
skipping 'rbbox_overlaps.cpp' Cython extension (up-to-date)
building 'rbbox_overlaps' extension
creating build
creating build/temp.linux-x86_64-2.7
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/usr/include/python2.7 -c rbbox_overlaps_kernel.cu -o build/temp.linux-x86_64-2.7/rbbox_overlaps_kernel.o -arch=sm_35 --ptxas-options=-v -c --compiler-options '-fPIC'
ptxas info    : 0 bytes gmem, 144 bytes cmem[3]
ptxas info    : Compiling entry function '_Z15overlaps_kerneliiPKfS0_Pf' for 'sm_35'
ptxas info    : Function properties for _Z15overlaps_kerneliiPKfS0_Pf
    128 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 83 registers, 2560 bytes smem, 352 bytes cmem[0], 200 bytes cmem[2]
ptxas info    : Function properties for __internal_trig_reduction_slowpathd
    40 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/usr/include/python2.7 -c rbbox_overlaps.cpp -o build/temp.linux-x86_64-2.7/rbbox_overlaps.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from rbbox_overlaps.cpp:449:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/rbbox_overlaps_kernel.o build/temp.linux-x86_64-2.7/rbbox_overlaps.o -L/usr/local/cuda-8.0/lib64 -Wl,-R/usr/local/cuda-8.0/lib64 -lcudart -o /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/rbbox_overlaps.so
skipping 'rotate_polygon_nms.cpp' Cython extension (up-to-date)
building 'rotate_polygon_nms' extension
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/usr/include/python2.7 -c rotate_polygon_nms_kernel.cu -o build/temp.linux-x86_64-2.7/rotate_polygon_nms_kernel.o -arch=sm_35 --ptxas-options=-v -c --compiler-options '-fPIC'
ptxas info    : 0 bytes gmem, 144 bytes cmem[3]
ptxas info    : Compiling entry function '_Z17rotate_nms_kernelifPKfPy' for 'sm_35'
ptxas info    : Function properties for _Z17rotate_nms_kernelifPKfPy
    128 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info    : Used 69 registers, 1536 bytes smem, 344 bytes cmem[0], 188 bytes cmem[2]
ptxas info    : Function properties for __internal_trig_reduction_slowpathd
    40 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/usr/include/python2.7 -c rotate_polygon_nms.cpp -o build/temp.linux-x86_64-2.7/rotate_polygon_nms.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from rotate_polygon_nms.cpp:449:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/rotate_polygon_nms_kernel.o build/temp.linux-x86_64-2.7/rotate_polygon_nms.o -L/usr/local/cuda-8.0/lib64 -Wl,-R/usr/local/cuda-8.0/lib64 -lcudart -o /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/rotate_polygon_nms.so
skipping 'iou_cpu.cpp' Cython extension (up-to-date)
building 'iou_cpu' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/cuda-8.0/include -I/usr/include/python2.7 -c iou_cpu.cpp -o build/temp.linux-x86_64-2.7/iou_cpu.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from iou_cpu.cpp:449:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^
c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/iou_cpu.o -L/usr/local/cuda-8.0/lib64 -Wl,-R/usr/local/cuda-8.0/lib64 -lcudart -o /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/iou_cpu.so
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils$ 
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils$ cd cython_utils/
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/cython_utils$ python setup.py build_ext --inplace
running build_ext
skipping 'bbox.c' Cython extension (up-to-date)
building 'cython_bbox' extension
creating build
creating build/temp.linux-x86_64-2.7
{'gcc': ['-Wno-cpp', '-Wno-unused-function']}
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c bbox.c -o build/temp.linux-x86_64-2.7/bbox.o -Wno-cpp -Wno-unused-function
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/bbox.o -o /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/cython_utils/cython_bbox.so
skipping 'nms.c' Cython extension (up-to-date)
building 'cython_nms' extension
{'gcc': ['-Wno-cpp', '-Wno-unused-function']}
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c nms.c -o build/temp.linux-x86_64-2.7/nms.o -Wno-cpp -Wno-unused-function
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/nms.o -o /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/cython_utils/cython_nms.so
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/box_utils/cython_utils$ 

10. Demo

Select a configuration file in the folder (libs/configs/) and copy its contents into cfgs.py, then download the corresponding weights.

/home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/configs

strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/configs$ ll
total 24
drwxrwxr-x  2 strong strong 4096 Jul 20 09:17 ./
drwxrwxr-x 10 strong strong 4096 Jul 20 09:17 ../
-rw-rw-r--  1 strong strong 3737 Jul 20 09:17 cfgs_DOTA_v3.py
-rw-rw-r--  1 strong strong 3730 Jul 20 09:17 cfgs_FDDB_mobilenet_v1.py
-rw-rw-r--  1 strong strong 3739 Jul 20 09:17 cfgs_ICDAR2015_v1.py
-rw-rw-r--  1 strong strong 3737 Jul 20 09:17 cfgs.py
-rw-rw-r--  1 strong strong    0 Jul 20 09:17 __init__.py
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/configs$

cfgs.py -->> cfgs_source-file.py (rename)
cfgs_FDDB_mobilenet_v1.py -->> cfgs.py (copy and rename)

strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/configs$ ls -l
total 20
-rw-rw-r-- 1 strong strong 3737 Jul 20 09:17 cfgs_DOTA_v3.py
-rw-rw-r-- 1 strong strong 3730 Jul 20 09:17 cfgs_FDDB_mobilenet_v1.py
-rw-rw-r-- 1 strong strong 3739 Jul 20 09:17 cfgs_ICDAR2015_v1.py
-rw-rw-r-- 1 strong strong 3730 Jul 20 09:17 cfgs.py
-rw-rw-r-- 1 strong strong 3737 Jul 20 09:17 cfgs_source-file.py
-rw-rw-r-- 1 strong strong    0 Jul 20 09:17 __init__.py
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/libs/configs$

https://github.com/DetectionTeamUCAS/Models

DOTA

python demo_rh.py --src_folder='/PATH/TO/DOTA/IMAGES_ORIGINAL/' 
                  --image_ext='.png' 
                  --des_folder='/PATH/TO/SAVE/RESULTS/' 
                  --save_res=False
                  --gpu='0'

10.2 FDDB

python camera_demo.py --gpu='0'
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/tools$ python camera_demo.py --gpu='0'
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/tools$ python camera_demo.py --gpu='0'
++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--
/home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow
Called with args:
Namespace(gpu='0')
model restore from : /home/strong/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/output/trained_weights/FasterRCNN_20180623_FDDB_mobile_v1/voc_200000model.ckpt
2019-07-30 13:39:34.875197: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-07-30 13:39:34.961497: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-30 13:39:34.961754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce GTX 1080 major: 6 minor: 1 memoryClockRate(GHz): 1.7335
pciBusID: 0000:01:00.0
totalMemory: 7.92GiB freeMemory: 7.51GiB
2019-07-30 13:39:34.961768: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080, pci bus id: 0000:01:00.0, compute capability: 6.1)
restore model
QObject::moveToThread: Current thread (0x73d8430) is not the object's thread (0x7f35885b3df0).
Cannot move to target thread (0x73d8430)
......
strong@foreverstrong:~/tensorflow_work/R2CNN_Faster-RCNN_Tensorflow/tools$

Eval

python eval.py --img_dir='/PATH/TO/DOTA/IMAGES/' 
               --image_ext='.png' 
               --test_annotation_path='/PATH/TO/TEST/ANNOTATION/'
               --gpu='0'

Inference

python inference.py --data_dir='/PATH/TO/DOTA/IMAGES_CROP/'      
                    --gpu='0'

Tensorboard

cd $PATH_ROOT/output/summary
tensorboard --logdir=.

Citation

Some relevant achievements based on this code.

Position Detection and Direction Prediction for Arbitrary-Oriented Ships via Multitask Rotation Region Convolutional Neural Network

Automatic Ship Detection of Remote Sensing Images from Google Earth in Complex Scenes Based on Multi-Scale Rotation Dense Feature Pyramid Networks

Wordbook

horizontal bounding box,HBB
oriented bounding box,OBB

References

DetectionTeamUCAS
https://github.com/DetectionTeamUCAS

R2CNN_Faster-RCNN_Tensorflow
https://github.com/DetectionTeamUCAS/R2CNN_Faster-RCNN_Tensorflow

DetectionTeamUCAS - Models
https://github.com/DetectionTeamUCAS/Models

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 10
    评论
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值