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
Approaches | mAP | PL | BD | BR | GTF | SV | LV | SH | TC | BC | ST | SBF | RA | HA | SP | HC |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SSD | 10.59 | 39.83 | 9.09 | 0.64 | 13.18 | 0.26 | 0.39 | 1.11 | 16.24 | 27.57 | 9.23 | 27.16 | 9.09 | 3.03 | 1.05 | 1.01 |
YOLOv2 | 21.39 | 39.57 | 20.29 | 36.58 | 23.42 | 8.85 | 2.09 | 4.82 | 44.34 | 38.35 | 34.65 | 16.02 | 37.62 | 47.23 | 25.5 | 7.45 |
R-FCN | 26.79 | 37.8 | 38.21 | 3.64 | 37.26 | 6.74 | 2.6 | 5.59 | 22.85 | 46.93 | 66.04 | 33.37 | 47.15 | 10.6 | 25.19 | 17.96 |
FR-H | 36.29 | 47.16 | 61 | 9.8 | 51.74 | 14.87 | 12.8 | 6.88 | 56.26 | 59.97 | 57.32 | 47.83 | 48.7 | 8.23 | 37.25 | 23.05 |
FR-O | 52.93 | 79.09 | 69.12 | 17.17 | 63.49 | 34.2 | 37.16 | 36.2 | 89.19 | 69.6 | 58.96 | 49.4 | 52.52 | 46.69 | 44.8 | 46.3 |
R2CNN | 60.67 | 80.94 | 65.75 | 35.34 | 67.44 | 59.92 | 50.91 | 55.81 | 90.67 | 66.92 | 72.39 | 55.06 | 52.23 | 55.14 | 53.35 | 48.22 |
RRPN | 61.01 | 88.52 | 71.20 | 31.66 | 59.30 | 51.85 | 56.19 | 57.25 | 90.81 | 72.84 | 67.38 | 56.69 | 52.84 | 53.08 | 51.94 | 53.58 |
ICN | 68.20 | 81.40 | 74.30 | 47.70 | 70.30 | 64.90 | 67.80 | 70.00 | 90.80 | 79.10 | 78.20 | 53.60 | 62.90 | 67.00 | 64.20 | 50.20 |
R2CNN++ | 71.16 | 89.66 | 81.22 | 45.50 | 75.10 | 68.27 | 60.17 | 66.83 | 90.90 | 80.69 | 86.15 | 64.05 | 63.48 | 65.34 | 68.01 | 62.05 |
3.2 Task2 - Horizontal Leaderboard
Approaches | mAP | PL | BD | BR | GTF | SV | LV | SH | TC | BC | ST | SBF | RA | HA | SP | HC |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SSD | 10.94 | 44.74 | 11.21 | 6.22 | 6.91 | 2 | 10.24 | 11.34 | 15.59 | 12.56 | 17.94 | 14.73 | 4.55 | 4.55 | 0.53 | 1.01 |
YOLOv2 | 39.2 | 76.9 | 33.87 | 22.73 | 34.88 | 38.73 | 32.02 | 52.37 | 61.65 | 48.54 | 33.91 | 29.27 | 36.83 | 36.44 | 38.26 | 11.61 |
R-FCN | 47.24 | 79.33 | 44.26 | 36.58 | 53.53 | 39.38 | 34.15 | 47.29 | 45.66 | 47.74 | 65.84 | 37.92 | 44.23 | 47.23 | 50.64 | 34.9 |
FR-H | 60.46 | 80.32 | 77.55 | 32.86 | 68.13 | 53.66 | 52.49 | 50.04 | 90.41 | 75.05 | 59.59 | 57 | 49.81 | 61.69 | 56.46 | 41.85 |
R2CNN | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
FPN | 72.00 | 88.70 | 75.10 | 52.60 | 59.20 | 69.40 | 78.80 | 84.50 | 90.60 | 81.30 | 82.60 | 52.50 | 62.10 | 76.60 | 66.30 | 60.10 |
ICN | 72.50 | 90.00 | 77.70 | 53.40 | 73.30 | 73.50 | 65.00 | 78.20 | 90.80 | 79.10 | 84.80 | 57.20 | 62.10 | 73.50 | 70.20 | 58.10 |
R2CNN++ | 75.35 | 90.18 | 81.88 | 55.30 | 73.29 | 72.09 | 77.65 | 78.06 | 90.91 | 82.44 | 86.39 | 64.53 | 63.45 | 75.77 | 78.21 | 60.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
-
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 -
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 -
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