PaddleX简介:PaddleX是飞桨全流程开发工具,集飞桨核心框架、模型库、工具及组件等深度学习开发所需全部能力于一身,打通深度学习开发全流程,并提供简明易懂的Python API,方便用户根据实际生产需求进行直接调用或二次开发,为开发者提供飞桨全流程开发的最佳实践。目前,该工具代码已开源于GitHub,同时可访问PaddleX在线使用文档,快速查阅读使用教程和API文档说明。
PaddleX代码GitHub链接:https://github.com/PaddlePaddle/PaddleX/tree/develop
PaddleX文档链接:https://paddlex.readthedocs.io/zh_CN/latest/index.html
PaddleX官网链接:https://www.paddlepaddle.org.cn/paddle/paddlex
Mask RCNN是基于以往的Faster RCNN架构上,添加一个分支,从而实现实例分割的目标。本示例在一个小数据集上展示了如何通过PaddleX进行训练。
!pip install paddlex -i https://mirror.baidu.com/pypi/simple
Looking in indexes: https://mirror.baidu.com/pypi/simple Collecting paddlex Downloading https://mirror.baidu.com/pypi/packages/34/e7/e90aee0f861362f57ede3a4dc8d3f85407be772cd98d3ea0c2d87992d09f/paddlex-0.1.6-py3-none-any.whl (190kB) |████████████████████████████████| 194kB 12.9MB/s eta 0:00:01 Requirement already satisfied: pyyaml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlex) (5.1.2) Collecting pycocotools (from paddlex) Downloading https://mirror.baidu.com/pypi/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz (1.5MB) |████████████████████████████████| 1.5MB 13.8MB/s eta 0:00:01 Collecting paddlehub>=1.6.2 (from paddlex) Downloading https://mirror.baidu.com/pypi/packages/6e/07/d4839d63853c01d2f9d040ff079e63e007c9e4084e74f447baf46b426811/paddlehub-1.6.2-py3-none-any.whl (207kB) |████████████████████████████████| 215kB 48.2MB/s eta 0:00:01 Requirement already satisfied: visualdl==1.3.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlex) (1.3.0) Collecting paddleslim==1.0.1 (from paddlex) Downloading https://mirror.baidu.com/pypi/packages/69/3c/880afac020e3393da5a55b4e0b504d2b644a7ebe91092d953185f09660d1/paddleslim-1.0.1-py2.py3-none-any.whl (103kB) |████████████████████████████████| 112kB 13.0MB/s eta 0:00:01 Requirement already satisfied: tqdm in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlex) (4.36.1) Collecting colorama (from paddlex) Downloading https://mirror.baidu.com/pypi/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl Requirement already satisfied: gunicorn>=19.10.0; sys_platform != "win32" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (20.0.4) Requirement already satisfied: six>=1.10.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (1.12.0) Requirement already satisfied: tb-paddle in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (0.3.6) Requirement already satisfied: pre-commit in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (1.21.0) Requirement already satisfied: chardet==3.0.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (3.0.4) Requirement already satisfied: sentencepiece in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (0.1.85) Requirement already satisfied: protobuf>=3.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (3.10.0) Requirement already satisfied: flake8 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (3.7.9) Requirement already satisfied: opencv-python in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (4.1.1.26) Requirement already satisfied: pandas; python_version >= "3" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (0.23.4) Requirement already satisfied: cma==2.7.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (2.7.0) Requirement already satisfied: Pillow in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (6.2.0) Requirement already satisfied: requests in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (2.22.0) Requirement already satisfied: flask>=1.1.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (1.1.1) Requirement already satisfied: tensorboard>=1.15 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (2.1.0) Requirement already satisfied: yapf==0.26.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (0.26.0) Requirement already satisfied: nltk in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (3.4.5) Requirement already satisfied: numpy; python_version >= "3" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (1.16.4) Requirement already satisfied: colorlog in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from paddlehub>=1.6.2->paddlex) (4.1.0) Requirement already satisfied: scipy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from visualdl==1.3.0->paddlex) (1.3.0) Requirement already satisfied: setuptools>=3.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from gunicorn>=19.10.0; sys_platform != "win32"->paddlehub>=1.6.2->paddlex) (41.4.0) Requirement already satisfied: moviepy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tb-paddle->paddlehub>=1.6.2->paddlex) (1.0.1) Requirement already satisfied: nodeenv>=0.11.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (1.3.4) Requirement already satisfied: aspy.yaml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (1.3.0) Requirement already satisfied: virtualenv>=15.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (16.7.9) Requirement already satisfied: identify>=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (1.4.10) Requirement already satisfied: toml in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (0.10.0) Requirement already satisfied: cfgv>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (2.0.1) Requirement already satisfied: importlib-metadata; python_version < "3.8" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pre-commit->paddlehub>=1.6.2->paddlex) (0.23) Requirement already satisfied: pycodestyle<2.6.0,>=2.5.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->paddlehub>=1.6.2->paddlex) (2.5.0) Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->paddlehub>=1.6.2->paddlex) (0.6.1) Requirement already satisfied: entrypoints<0.4.0,>=0.3.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->paddlehub>=1.6.2->paddlex) (0.3) Requirement already satisfied: pyflakes<2.2.0,>=2.1.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flake8->paddlehub>=1.6.2->paddlex) (2.1.1) Requirement already satisfied: pytz>=2011k in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pandas; python_version >= "3"->paddlehub>=1.6.2->paddlex) (2019.3) Requirement already satisfied: python-dateutil>=2.5.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pandas; python_version >= "3"->paddlehub>=1.6.2->paddlex) (2.8.0) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->paddlehub>=1.6.2->paddlex) (2019.9.11) Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->paddlehub>=1.6.2->paddlex) (2.8) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests->paddlehub>=1.6.2->paddlex) (1.25.6) Requirement already satisfied: itsdangerous>=0.24 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.0->paddlehub>=1.6.2->paddlex) (1.1.0) Requirement already satisfied: click>=5.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.0->paddlehub>=1.6.2->paddlex) (7.0) Requirement already satisfied: Jinja2>=2.10.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.0->paddlehub>=1.6.2->paddlex) (2.10.1) Requirement already satisfied: Werkzeug>=0.15 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from flask>=1.1.0->paddlehub>=1.6.2->paddlex) (0.16.0) Requirement already satisfied: google-auth<2,>=1.6.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (1.10.0) Requirement already satisfied: markdown>=2.6.8 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (3.1.1) Requirement already satisfied: grpcio>=1.24.3 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (1.26.0) Requirement already satisfied: wheel>=0.26; python_version >= "3" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (0.33.6) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (0.4.1) Requirement already satisfied: absl-py>=0.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (0.8.1) Requirement already satisfied: imageio<3.0,>=2.5; python_version >= "3.4" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy->tb-paddle->paddlehub>=1.6.2->paddlex) (2.6.1) Requirement already satisfied: decorator<5.0,>=4.0.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy->tb-paddle->paddlehub>=1.6.2->paddlex) (4.4.0) Requirement already satisfied: imageio-ffmpeg>=0.2.0; python_version >= "3.4" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy->tb-paddle->paddlehub>=1.6.2->paddlex) (0.3.0) Requirement already satisfied: proglog<=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy->tb-paddle->paddlehub>=1.6.2->paddlex) (0.1.9) Requirement already satisfied: zipp>=0.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from importlib-metadata; python_version < "3.8"->pre-commit->paddlehub>=1.6.2->paddlex) (0.6.0) Requirement already satisfied: MarkupSafe>=0.23 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from Jinja2>=2.10.1->flask>=1.1.0->paddlehub>=1.6.2->paddlex) (1.1.1) Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (0.2.7) Requirement already satisfied: rsa<4.1,>=3.1.4 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (4.0) Requirement already satisfied: cachetools<5.0,>=2.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from google-auth<2,>=1.6.3->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (4.0.0) Requirement already satisfied: requests-oauthlib>=0.7.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (1.3.0) Requirement already satisfied: more-itertools in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from zipp>=0.5->importlib-metadata; python_version < "3.8"->pre-commit->paddlehub>=1.6.2->paddlex) (7.2.0) Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (0.4.8) Requirement already satisfied: oauthlib>=3.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard>=1.15->paddlehub>=1.6.2->paddlex) (3.1.0) Building wheels for collected packages: pycocotools Building wheel for pycocotools (setup.py) ... done Created wheel for pycocotools: filename=pycocotools-2.0.0-cp37-cp37m-linux_x86_64.whl size=286747 sha256=e080730f10142ac2aea5108457ebfb8537ff6646445315bfbe08951c8b3066a6 Stored in directory: /home/aistudio/.cache/pip/wheels/87/53/98/53ebc0e2e042812e7626cb4e1e9e5418a7e77c187d1719620f Successfully built pycocotools Installing collected packages: pycocotools, paddlehub, paddleslim, colorama, paddlex Found existing installation: paddlehub 1.6.0 Uninstalling paddlehub-1.6.0: Successfully uninstalled paddlehub-1.6.0 Successfully installed colorama-0.4.3 paddlehub-1.6.2 paddleslim-1.0.1 paddlex-0.1.6 pycocotools-2.0.0
! wget https://bj.bcebos.com/paddle/datasets/xiaoduxiong_ins_det.tar.gz
! tar xzf xiaoduxiong_ins_det.tar.gz
--2020-05-09 21:53:07-- https://bj.bcebos.com/paddlex/datasets/xiaoduxiong_ins_det.tar.gz Resolving bj.bcebos.com (bj.bcebos.com)... 182.61.200.195, 182.61.200.229 Connecting to bj.bcebos.com (bj.bcebos.com)|182.61.200.195|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 4067574 (3.9M) [application/octet-stream] Saving to: ‘xiaoduxiong_ins_det.tar.gz’ xiaoduxiong_ins_det 100%[===================>] 3.88M 15.9MB/s in 0.2s 2020-05-09 21:53:07 (15.9 MB/s) - ‘xiaoduxiong_ins_det.tar.gz’ saved [4067574/4067574]
xiaoduxiong_ins_det.tar.gz是下载的数据集,把它进行解压得到xiaoduxiong_ins_det文件夹。
文件夹打开为
#设置使用0号GPU(如无GPU,执行此代码后仍然会使用GPU训练模型)
import matplotlib
matplotlib.use('Agg')
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['CPU_NUM'] = '1'
import paddlex as pdx
2020-05-09 21:53:34,223-INFO: font search path ['/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf', '/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/afm', '/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/pdfcorefonts'] 2020-05-09 21:53:34,668-INFO: generated new fontManager
定义数据处理流程,其中训练和测试需分别定义,训练过程包括了部分测试过程中不需要的数据增强操作,在本示例中,训练过程使用了RandomHorizontalFlip数据增强方式。
from paddlex.det import transforms
train_transforms = transforms.Compose([
transforms.RandomHorizontalFlip(),
transforms.Normalize(),
transforms.ResizeByShort(short_size=800, max_size=1333),
transforms.Padding(coarsest_stride=32)
])
eval_transforms = transforms.Compose([
transforms.Normalize(),
transforms.ResizeByShort(short_size=800, max_size=1333),
transforms.Padding(coarsest_stride=32)
])
目标检测可使用VOCDetection格式和COCODetection两种数据集,此处由于数据集为VOC格式,因此采用pdx.datasets.COCODetection来加载数据集。
train_dataset = pdx.datasets.CocoDetection(
data_dir='xiaoduxiong_ins_det/JPEGImages',
ann_file='xiaoduxiong_ins_det/train.json',
transforms=train_transforms,
shuffle=True)
eval_dataset = pdx.datasets.CocoDetection(
data_dir='xiaoduxiong_ins_det/JPEGImages',
ann_file='xiaoduxiong_ins_det/val.json',
transforms=eval_transforms)
loading annotations into memory... Done (t=0.00s) creating index... index created! 2020-05-09 22:01:05 [INFO] Starting to read file list from dataset... 2020-05-09 22:01:05 [INFO] 14 samples in file xiaoduxiong_ins_det/train.json loading annotations into memory... Done (t=0.00s) creating index... index created! 2020-05-09 22:01:05 [INFO] Starting to read file list from dataset... 2020-05-09 22:01:05 [INFO] 4 samples in file xiaoduxiong_ins_det/val.json
num_classes = len(train_dataset.labels) + 1
model = pdx.det.MaskRCNN(num_classes=num_classes)
model.train(
num_epochs=12,
train_dataset=train_dataset,
train_batch_size=1,
eval_dataset=eval_dataset,
learning_rate=0.00125,
warmup_steps=10,
lr_decay_epochs=[8, 11],
save_interval_epochs=1,
save_dir='output/mask_rcnn_r50_fpn')
Downloading ResNet50_cos_pretrained.tar [==================================================] 100.00% Uncompress /home/aistudio/.paddlehub/tmp/tmpknv3qrn5/ResNet50_cos_pretrained.tar [==================================================] 100.00% 2020-05-09 22:02:05 [INFO] Load pretrain weights from output/mask_rcnn_r50_fpn/pretrain/DetResNet50. 2020-05-09 22:02:06 [INFO] There are 265 varaibles in output/mask_rcnn_r50_fpn/pretrain/DetResNet50 are loaded. 2020-05-09 22:02:10 [INFO] [TRAIN] Epoch=1/12, Step=2/14, loss=3.886949, loss_cls=0.664755, loss_bbox=0.13179, loss_mask=2.36395, loss_rpn_cls=0.682289, loss_rpn_bbox=0.044165, lr=0.0005, time_each_step=2.27s, eta=0:8:4 2020-05-09 22:02:11 [INFO] [TRAIN] Epoch=1/12, Step=4/14, loss=2.4775, loss_cls=0.570029, loss_bbox=0.05945, loss_mask=1.155098, loss_rpn_cls=0.68499, loss_rpn_bbox=0.007932, lr=0.000667, time_each_step=1.2s, eta=0:4:13 2020-05-09 22:02:11 [INFO] [TRAIN] Epoch=1/12, Step=6/14, loss=1.983417, loss_cls=0.460462, loss_bbox=0.074706, loss_mask=0.746922, loss_rpn_cls=0.687414, loss_rpn_bbox=0.013913, lr=0.000833, time_each_step=0.84s, eta=0:2:56 2020-05-09 22:02:11 [INFO] [TRAIN] Epoch=1/12, Step=8/14, loss=1.816846, loss_cls=0.376999, loss_bbox=0.016176, loss_mask=0.727473, loss_rpn_cls=0.684647, loss_rpn_bbox=0.011551, lr=0.001, time_each_step=0.66s, eta=0:2:17 2020-05-09 22:02:11 [INFO] [TRAIN] Epoch=1/12, Step=10/14, loss=1.733669, loss_cls=0.254205, loss_bbox=0.063846, loss_mask=0.679651, loss_rpn_cls=0.6817, loss_rpn_bbox=0.054268, lr=0.001167, time_each_step=0.55s, eta=0:1:53 2020-05-09 22:02:12 [INFO] [TRAIN] Epoch=1/12, Step=12/14, loss=1.495921, loss_cls=0.172946, loss_bbox=0.058553, loss_mask=0.563473, loss_rpn_cls=0.673008, loss_rpn_bbox=0.027941, lr=0.00125, time_each_step=0.48s, eta=0:1:37 2020-05-09 22:02:12 [INFO] [TRAIN] Epoch=1/12, Step=14/14, loss=1.477747, loss_cls=0.102855, loss_bbox=0.030418, loss_mask=0.623084, loss_rpn_cls=0.660598, loss_rpn_bbox=0.060793, lr=0.00125, time_each_step=0.43s, eta=0:1:26 2020-05-09 22:02:12 [INFO] [TRAIN] Epoch 1 finished, loss=2.186054, loss_cls=0.392375, loss_bbox=0.058426, loss_mask=1.025799, loss_rpn_cls=0.679776, loss_rpn_bbox=0.029678, lr=0.000923 . 2020-05-09 22:02:12 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:01<00:00, 2.04it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.05s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.003 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.010 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.003 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.150 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.150 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.08s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.001 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.010 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.002 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.079 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.079 2020-05-09 22:02:15 [INFO] [EVAL] Finished, Epoch=1, bbox_mmap=0.002764, segm_mmap=0.001269 . 2020-05-09 22:02:19 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:02:23 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_1. 2020-05-09 22:02:23 [INFO] Current evaluated best model in eval_dataset is epoch_1, bbox_mmap=0.002764081983468535 2020-05-09 22:02:25 [INFO] [TRAIN] Epoch=2/12, Step=2/14, loss=1.270385, loss_cls=0.080333, loss_bbox=0.041825, loss_mask=0.487017, loss_rpn_cls=0.638944, loss_rpn_bbox=0.022267, lr=0.00125, time_each_step=0.51s, eta=0:3:10 2020-05-09 22:02:26 [INFO] [TRAIN] Epoch=2/12, Step=4/14, loss=1.3769, loss_cls=0.160875, loss_bbox=0.151455, loss_mask=0.445432, loss_rpn_cls=0.605775, loss_rpn_bbox=0.013363, lr=0.00125, time_each_step=0.46s, eta=0:3:9 2020-05-09 22:02:26 [INFO] [TRAIN] Epoch=2/12, Step=6/14, loss=1.302179, loss_cls=0.161382, loss_bbox=0.11214, loss_mask=0.453434, loss_rpn_cls=0.558731, loss_rpn_bbox=0.016492, lr=0.00125, time_each_step=0.43s, eta=0:3:7 2020-05-09 22:02:26 [INFO] [TRAIN] Epoch=2/12, Step=8/14, loss=1.036636, loss_cls=0.130026, loss_bbox=0.069399, loss_mask=0.342105, loss_rpn_cls=0.487623, loss_rpn_bbox=0.007483, lr=0.00125, time_each_step=0.22s, eta=0:3:5 2020-05-09 22:02:26 [INFO] [TRAIN] Epoch=2/12, Step=10/14, loss=1.224749, loss_cls=0.226746, loss_bbox=0.202998, loss_mask=0.319788, loss_rpn_cls=0.430081, loss_rpn_bbox=0.045137, lr=0.00125, time_each_step=0.22s, eta=0:3:5 2020-05-09 22:02:26 [INFO] [TRAIN] Epoch=2/12, Step=12/14, loss=1.445038, loss_cls=0.419962, loss_bbox=0.334873, loss_mask=0.321575, loss_rpn_cls=0.333337, loss_rpn_bbox=0.035291, lr=0.00125, time_each_step=0.22s, eta=0:3:4 2020-05-09 22:02:27 [INFO] [TRAIN] Epoch=2/12, Step=14/14, loss=1.590986, loss_cls=0.41588, loss_bbox=0.451757, loss_mask=0.342169, loss_rpn_cls=0.329969, loss_rpn_bbox=0.051211, lr=0.00125, time_each_step=0.22s, eta=0:3:4 2020-05-09 22:02:27 [INFO] [TRAIN] Epoch 2 finished, loss=1.322231, loss_cls=0.22825, loss_bbox=0.175453, loss_mask=0.396079, loss_rpn_cls=0.495341, loss_rpn_bbox=0.027108, lr=0.00125 . 2020-05-09 22:02:27 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:01<00:00, 2.02it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.121 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.520 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.121 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.057 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.186 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.193 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.193 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.283 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.753 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.065 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.288 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.100 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.436 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.443 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.443 2020-05-09 22:02:29 [INFO] [EVAL] Finished, Epoch=2, bbox_mmap=0.121119, segm_mmap=0.28305 . 2020-05-09 22:02:37 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:02:43 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_2. 2020-05-09 22:02:43 [INFO] Current evaluated best model in eval_dataset is epoch_2, bbox_mmap=0.12111946609648877 2020-05-09 22:02:47 [INFO] [TRAIN] Epoch=3/12, Step=2/14, loss=0.838224, loss_cls=0.196731, loss_bbox=0.069478, loss_mask=0.433986, loss_rpn_cls=0.136377, loss_rpn_bbox=0.001653, lr=0.00125, time_each_step=0.4s, eta=0:3:19 2020-05-09 22:02:47 [INFO] [TRAIN] Epoch=3/12, Step=4/14, loss=1.335806, loss_cls=0.274062, loss_bbox=0.190859, loss_mask=0.518502, loss_rpn_cls=0.296325, loss_rpn_bbox=0.056059, lr=0.00125, time_each_step=0.4s, eta=0:3:18 2020-05-09 22:02:47 [INFO] [TRAIN] Epoch=3/12, Step=6/14, loss=0.934558, loss_cls=0.219811, loss_bbox=0.235506, loss_mask=0.240984, loss_rpn_cls=0.195543, loss_rpn_bbox=0.042714, lr=0.00125, time_each_step=0.4s, eta=0:3:17 2020-05-09 22:02:48 [INFO] [TRAIN] Epoch=3/12, Step=8/14, loss=1.012169, loss_cls=0.260772, loss_bbox=0.277163, loss_mask=0.253538, loss_rpn_cls=0.186747, loss_rpn_bbox=0.033948, lr=0.00125, time_each_step=0.3s, eta=0:3:16 2020-05-09 22:02:48 [INFO] [TRAIN] Epoch=3/12, Step=10/14, loss=0.927871, loss_cls=0.262115, loss_bbox=0.163421, loss_mask=0.309176, loss_rpn_cls=0.182873, loss_rpn_bbox=0.010286, lr=0.00125, time_each_step=0.3s, eta=0:3:15 2020-05-09 22:02:48 [INFO] [TRAIN] Epoch=3/12, Step=12/14, loss=1.277458, loss_cls=0.278221, loss_bbox=0.286454, loss_mask=0.433599, loss_rpn_cls=0.231979, loss_rpn_bbox=0.047205, lr=0.00125, time_each_step=0.3s, eta=0:3:15 2020-05-09 22:02:48 [INFO] [TRAIN] Epoch=3/12, Step=14/14, loss=1.284492, loss_cls=0.397342, loss_bbox=0.340031, loss_mask=0.358185, loss_rpn_cls=0.163075, loss_rpn_bbox=0.025858, lr=0.00125, time_each_step=0.3s, eta=0:3:14 2020-05-09 22:02:48 [INFO] [TRAIN] Epoch 3 finished, loss=1.151105, loss_cls=0.280768, loss_bbox=0.237047, loss_mask=0.417667, loss_rpn_cls=0.190021, loss_rpn_bbox=0.025602, lr=0.00125 . 2020-05-09 22:02:48 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.73it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.134 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.433 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.134 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.071 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.236 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.293 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.293 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.197 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.541 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.228 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.086 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.314 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.364 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.364 2020-05-09 22:02:51 [INFO] [EVAL] Finished, Epoch=3, bbox_mmap=0.133539, segm_mmap=0.197282 . 2020-05-09 22:03:00 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:03:06 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_3. 2020-05-09 22:03:06 [INFO] Current evaluated best model in eval_dataset is epoch_3, bbox_mmap=0.13353865912667676 2020-05-09 22:03:09 [INFO] [TRAIN] Epoch=4/12, Step=2/14, loss=0.977038, loss_cls=0.215589, loss_bbox=0.279654, loss_mask=0.355098, loss_rpn_cls=0.101265, loss_rpn_bbox=0.025432, lr=0.00125, time_each_step=0.48s, eta=0:3:24 2020-05-09 22:03:10 [INFO] [TRAIN] Epoch=4/12, Step=4/14, loss=1.134786, loss_cls=0.281832, loss_bbox=0.378546, loss_mask=0.278895, loss_rpn_cls=0.148931, loss_rpn_bbox=0.046582, lr=0.00125, time_each_step=0.48s, eta=0:3:23 2020-05-09 22:03:10 [INFO] [TRAIN] Epoch=4/12, Step=6/14, loss=1.005769, loss_cls=0.266384, loss_bbox=0.231148, loss_mask=0.264584, loss_rpn_cls=0.191026, loss_rpn_bbox=0.052627, lr=0.00125, time_each_step=0.48s, eta=0:3:22 2020-05-09 22:03:10 [INFO] [TRAIN] Epoch=4/12, Step=8/14, loss=0.774631, loss_cls=0.224629, loss_bbox=0.151023, loss_mask=0.309683, loss_rpn_cls=0.073334, loss_rpn_bbox=0.015962, lr=0.00125, time_each_step=0.3s, eta=0:3:20 2020-05-09 22:03:10 [INFO] [TRAIN] Epoch=4/12, Step=10/14, loss=0.385831, loss_cls=0.09471, loss_bbox=0.070422, loss_mask=0.190381, loss_rpn_cls=0.028107, loss_rpn_bbox=0.002211, lr=0.00125, time_each_step=0.3s, eta=0:3:19 2020-05-09 22:03:11 [INFO] [TRAIN] Epoch=4/12, Step=12/14, loss=0.856066, loss_cls=0.239379, loss_bbox=0.262657, loss_mask=0.25781, loss_rpn_cls=0.077288, loss_rpn_bbox=0.018933, lr=0.00125, time_each_step=0.3s, eta=0:3:18 2020-05-09 22:03:11 [INFO] [TRAIN] Epoch=4/12, Step=14/14, loss=0.84287, loss_cls=0.258449, loss_bbox=0.292026, loss_mask=0.217285, loss_rpn_cls=0.06543, loss_rpn_bbox=0.009681, lr=0.00125, time_each_step=0.3s, eta=0:3:18 2020-05-09 22:03:11 [INFO] [TRAIN] Epoch 4 finished, loss=0.922703, loss_cls=0.267003, loss_bbox=0.246794, loss_mask=0.280243, loss_rpn_cls=0.104651, loss_rpn_bbox=0.024012, lr=0.00125 . 2020-05-09 22:03:11 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.82it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.093 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.304 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.002 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.093 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.029 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.164 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.386 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.386 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.04s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.529 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.968 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.595 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.529 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.150 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.600 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.600 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.600 2020-05-09 22:03:14 [INFO] [EVAL] Finished, Epoch=4, bbox_mmap=0.093216, segm_mmap=0.528657 . 2020-05-09 22:03:18 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_4. 2020-05-09 22:03:18 [INFO] Current evaluated best model in eval_dataset is epoch_3, bbox_mmap=0.13353865912667676 2020-05-09 22:03:20 [INFO] [TRAIN] Epoch=5/12, Step=2/14, loss=0.90227, loss_cls=0.286263, loss_bbox=0.266188, loss_mask=0.210073, loss_rpn_cls=0.110468, loss_rpn_bbox=0.029276, lr=0.00125, time_each_step=0.4s, eta=0:1:36 2020-05-09 22:03:20 [INFO] [TRAIN] Epoch=5/12, Step=4/14, loss=0.9255, loss_cls=0.323662, loss_bbox=0.241548, loss_mask=0.222965, loss_rpn_cls=0.105602, loss_rpn_bbox=0.031724, lr=0.00125, time_each_step=0.4s, eta=0:1:35 2020-05-09 22:03:20 [INFO] [TRAIN] Epoch=5/12, Step=6/14, loss=0.721233, loss_cls=0.282317, loss_bbox=0.175112, loss_mask=0.180974, loss_rpn_cls=0.073519, loss_rpn_bbox=0.009311, lr=0.00125, time_each_step=0.4s, eta=0:1:35 2020-05-09 22:03:21 [INFO] [TRAIN] Epoch=5/12, Step=8/14, loss=0.378048, loss_cls=0.122392, loss_bbox=0.077603, loss_mask=0.13922, loss_rpn_cls=0.036721, loss_rpn_bbox=0.002111, lr=0.00125, time_each_step=0.22s, eta=0:1:33 2020-05-09 22:03:21 [INFO] [TRAIN] Epoch=5/12, Step=10/14, loss=0.767917, loss_cls=0.226924, loss_bbox=0.265713, loss_mask=0.204084, loss_rpn_cls=0.056499, loss_rpn_bbox=0.014696, lr=0.00125, time_each_step=0.22s, eta=0:1:32 2020-05-09 22:03:21 [INFO] [TRAIN] Epoch=5/12, Step=12/14, loss=1.174887, loss_cls=0.436457, loss_bbox=0.395087, loss_mask=0.212828, loss_rpn_cls=0.101162, loss_rpn_bbox=0.029354, lr=0.00125, time_each_step=0.22s, eta=0:1:32 2020-05-09 22:03:21 [INFO] [TRAIN] Epoch=5/12, Step=14/14, loss=0.523598, loss_cls=0.136826, loss_bbox=0.128898, loss_mask=0.217332, loss_rpn_cls=0.034208, loss_rpn_bbox=0.006334, lr=0.00125, time_each_step=0.22s, eta=0:1:31 2020-05-09 22:03:21 [INFO] [TRAIN] Epoch 5 finished, loss=0.884323, loss_cls=0.294723, loss_bbox=0.278611, loss_mask=0.204444, loss_rpn_cls=0.084924, loss_rpn_bbox=0.02162, lr=0.00125 . 2020-05-09 22:03:21 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.79it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.267 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.811 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.004 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.267 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.071 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.357 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.421 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.421 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.401 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.847 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.105 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.405 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.107 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.500 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.586 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.586 2020-05-09 22:03:24 [INFO] [EVAL] Finished, Epoch=5, bbox_mmap=0.267123, segm_mmap=0.401109 . 2020-05-09 22:03:32 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:03:38 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_5. 2020-05-09 22:03:38 [INFO] Current evaluated best model in eval_dataset is epoch_5, bbox_mmap=0.2671226162045545 2020-05-09 22:03:41 [INFO] [TRAIN] Epoch=6/12, Step=2/14, loss=0.363553, loss_cls=0.119102, loss_bbox=0.084944, loss_mask=0.136303, loss_rpn_cls=0.020905, loss_rpn_bbox=0.002299, lr=0.00125, time_each_step=0.39s, eta=0:2:20 2020-05-09 22:03:42 [INFO] [TRAIN] Epoch=6/12, Step=4/14, loss=1.153931, loss_cls=0.391186, loss_bbox=0.420152, loss_mask=0.191076, loss_rpn_cls=0.109254, loss_rpn_bbox=0.042263, lr=0.00125, time_each_step=0.39s, eta=0:2:20 2020-05-09 22:03:42 [INFO] [TRAIN] Epoch=6/12, Step=6/14, loss=0.745651, loss_cls=0.258813, loss_bbox=0.223259, loss_mask=0.209676, loss_rpn_cls=0.045997, loss_rpn_bbox=0.007906, lr=0.00125, time_each_step=0.39s, eta=0:2:19 2020-05-09 22:03:42 [INFO] [TRAIN] Epoch=6/12, Step=8/14, loss=1.003895, loss_cls=0.308496, loss_bbox=0.280269, loss_mask=0.311415, loss_rpn_cls=0.082799, loss_rpn_bbox=0.020915, lr=0.00125, time_each_step=0.29s, eta=0:2:17 2020-05-09 22:03:42 [INFO] [TRAIN] Epoch=6/12, Step=10/14, loss=1.064972, loss_cls=0.333568, loss_bbox=0.41207, loss_mask=0.180219, loss_rpn_cls=0.107391, loss_rpn_bbox=0.031723, lr=0.00125, time_each_step=0.29s, eta=0:2:17 2020-05-09 22:03:43 [INFO] [TRAIN] Epoch=6/12, Step=12/14, loss=0.862184, loss_cls=0.268368, loss_bbox=0.314459, loss_mask=0.217994, loss_rpn_cls=0.047289, loss_rpn_bbox=0.014074, lr=0.00125, time_each_step=0.29s, eta=0:2:16 2020-05-09 22:03:43 [INFO] [TRAIN] Epoch=6/12, Step=14/14, loss=1.180532, loss_cls=0.386451, loss_bbox=0.473016, loss_mask=0.196783, loss_rpn_cls=0.090968, loss_rpn_bbox=0.033313, lr=0.00125, time_each_step=0.29s, eta=0:2:16 2020-05-09 22:03:43 [INFO] [TRAIN] Epoch 6 finished, loss=0.887531, loss_cls=0.291703, loss_bbox=0.302435, loss_mask=0.205723, loss_rpn_cls=0.068762, loss_rpn_bbox=0.018907, lr=0.00125 . 2020-05-09 22:03:43 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.87it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.339 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.926 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.091 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.339 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.107 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.379 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.443 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.443 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.03s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.596 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.958 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.715 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.602 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.179 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.614 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.729 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.729 2020-05-09 22:03:45 [INFO] [EVAL] Finished, Epoch=6, bbox_mmap=0.339187, segm_mmap=0.595652 . 2020-05-09 22:03:55 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:04:00 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_6. 2020-05-09 22:04:00 [INFO] Current evaluated best model in eval_dataset is epoch_6, bbox_mmap=0.3391866538580252 2020-05-09 22:04:06 [INFO] [TRAIN] Epoch=7/12, Step=2/14, loss=0.743336, loss_cls=0.287895, loss_bbox=0.238367, loss_mask=0.149747, loss_rpn_cls=0.05952, loss_rpn_bbox=0.007807, lr=0.00125, time_each_step=0.56s, eta=0:2:16 2020-05-09 22:04:06 [INFO] [TRAIN] Epoch=7/12, Step=4/14, loss=1.167311, loss_cls=0.410171, loss_bbox=0.472347, loss_mask=0.16402, loss_rpn_cls=0.089911, loss_rpn_bbox=0.030862, lr=0.00125, time_each_step=0.56s, eta=0:2:15 2020-05-09 22:04:06 [INFO] [TRAIN] Epoch=7/12, Step=6/14, loss=0.85921, loss_cls=0.313996, loss_bbox=0.315545, loss_mask=0.164572, loss_rpn_cls=0.051588, loss_rpn_bbox=0.013509, lr=0.00125, time_each_step=0.56s, eta=0:2:14 2020-05-09 22:04:07 [INFO] [TRAIN] Epoch=7/12, Step=8/14, loss=1.083096, loss_cls=0.362062, loss_bbox=0.428009, loss_mask=0.164868, loss_rpn_cls=0.095436, loss_rpn_bbox=0.032721, lr=0.00125, time_each_step=0.4s, eta=0:2:12 2020-05-09 22:04:07 [INFO] [TRAIN] Epoch=7/12, Step=10/14, loss=0.519543, loss_cls=0.161854, loss_bbox=0.130099, loss_mask=0.198869, loss_rpn_cls=0.023285, loss_rpn_bbox=0.005434, lr=0.00125, time_each_step=0.4s, eta=0:2:11 2020-05-09 22:04:07 [INFO] [TRAIN] Epoch=7/12, Step=12/14, loss=0.546183, loss_cls=0.204546, loss_bbox=0.114183, loss_mask=0.205791, loss_rpn_cls=0.018483, loss_rpn_bbox=0.003181, lr=0.00125, time_each_step=0.4s, eta=0:2:10 2020-05-09 22:04:07 [INFO] [TRAIN] Epoch=7/12, Step=14/14, loss=1.093823, loss_cls=0.33002, loss_bbox=0.46263, loss_mask=0.182876, loss_rpn_cls=0.092741, loss_rpn_bbox=0.025555, lr=0.00125, time_each_step=0.4s, eta=0:2:9 2020-05-09 22:04:07 [INFO] [TRAIN] Epoch 7 finished, loss=0.841266, loss_cls=0.280739, loss_bbox=0.305076, loss_mask=0.179889, loss_rpn_cls=0.058905, loss_rpn_bbox=0.016656, lr=0.00125 . 2020-05-09 22:04:07 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.40it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.298 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.829 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.110 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.298 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.043 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.521 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.521 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.521 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.30s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.565 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.900 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.807 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.572 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.129 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.686 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.714 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.714 2020-05-09 22:04:11 [INFO] [EVAL] Finished, Epoch=7, bbox_mmap=0.298007, segm_mmap=0.565415 . 2020-05-09 22:04:15 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_7. 2020-05-09 22:04:15 [INFO] Current evaluated best model in eval_dataset is epoch_6, bbox_mmap=0.3391866538580252 2020-05-09 22:04:18 [INFO] [TRAIN] Epoch=8/12, Step=2/14, loss=0.737745, loss_cls=0.259428, loss_bbox=0.265398, loss_mask=0.153623, loss_rpn_cls=0.048261, loss_rpn_bbox=0.011036, lr=0.00125, time_each_step=0.51s, eta=0:1:14 2020-05-09 22:04:18 [INFO] [TRAIN] Epoch=8/12, Step=4/14, loss=0.411736, loss_cls=0.136504, loss_bbox=0.09357, loss_mask=0.158134, loss_rpn_cls=0.019961, loss_rpn_bbox=0.003568, lr=0.00125, time_each_step=0.51s, eta=0:1:13 2020-05-09 22:04:18 [INFO] [TRAIN] Epoch=8/12, Step=6/14, loss=0.541517, loss_cls=0.19082, loss_bbox=0.157647, loss_mask=0.149153, loss_rpn_cls=0.036356, loss_rpn_bbox=0.00754, lr=0.00125, time_each_step=0.51s, eta=0:1:12 2020-05-09 22:04:19 [INFO] [TRAIN] Epoch=8/12, Step=8/14, loss=0.402282, loss_cls=0.123368, loss_bbox=0.097416, loss_mask=0.152434, loss_rpn_cls=0.024198, loss_rpn_bbox=0.004866, lr=0.00125, time_each_step=0.24s, eta=0:1:9 2020-05-09 22:04:19 [INFO] [TRAIN] Epoch=8/12, Step=10/14, loss=0.987475, loss_cls=0.301541, loss_bbox=0.369651, loss_mask=0.200745, loss_rpn_cls=0.089187, loss_rpn_bbox=0.026351, lr=0.00125, time_each_step=0.24s, eta=0:1:9 2020-05-09 22:04:19 [INFO] [TRAIN] Epoch=8/12, Step=12/14, loss=0.714176, loss_cls=0.18017, loss_bbox=0.223228, loss_mask=0.267123, loss_rpn_cls=0.031377, loss_rpn_bbox=0.012278, lr=0.00125, time_each_step=0.24s, eta=0:1:8 2020-05-09 22:04:19 [INFO] [TRAIN] Epoch=8/12, Step=14/14, loss=0.864586, loss_cls=0.28466, loss_bbox=0.307369, loss_mask=0.162862, loss_rpn_cls=0.087002, loss_rpn_bbox=0.022693, lr=0.00125, time_each_step=0.24s, eta=0:1:8 2020-05-09 22:04:19 [INFO] [TRAIN] Epoch 8 finished, loss=0.750248, loss_cls=0.242133, loss_bbox=0.252059, loss_mask=0.187391, loss_rpn_cls=0.053607, loss_rpn_bbox=0.015059, lr=0.00125 . 2020-05-09 22:04:19 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:08<00:00, 2.09s/it]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.359 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.962 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.158 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.359 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.129 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.479 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.593 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.593 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.589 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.962 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.769 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.592 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.179 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.650 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.671 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.671 2020-05-09 22:04:28 [INFO] [EVAL] Finished, Epoch=8, bbox_mmap=0.359292, segm_mmap=0.588586 . 2020-05-09 22:04:37 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:04:42 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_8. 2020-05-09 22:04:42 [INFO] Current evaluated best model in eval_dataset is epoch_8, bbox_mmap=0.35929191819862094 2020-05-09 22:04:45 [INFO] [TRAIN] Epoch=9/12, Step=2/14, loss=0.794768, loss_cls=0.313613, loss_bbox=0.292503, loss_mask=0.14048, loss_rpn_cls=0.040837, loss_rpn_bbox=0.007335, lr=0.000125, time_each_step=0.42s, eta=0:1:45 2020-05-09 22:04:45 [INFO] [TRAIN] Epoch=9/12, Step=4/14, loss=0.584085, loss_cls=0.193809, loss_bbox=0.159631, loss_mask=0.188194, loss_rpn_cls=0.030456, loss_rpn_bbox=0.011994, lr=0.000125, time_each_step=0.42s, eta=0:1:44 2020-05-09 22:04:46 [INFO] [TRAIN] Epoch=9/12, Step=6/14, loss=0.784371, loss_cls=0.271758, loss_bbox=0.266296, loss_mask=0.156455, loss_rpn_cls=0.070541, loss_rpn_bbox=0.019322, lr=0.000125, time_each_step=0.42s, eta=0:1:44 2020-05-09 22:04:46 [INFO] [TRAIN] Epoch=9/12, Step=8/14, loss=0.792014, loss_cls=0.261729, loss_bbox=0.264646, loss_mask=0.157614, loss_rpn_cls=0.086332, loss_rpn_bbox=0.021694, lr=0.000125, time_each_step=0.3s, eta=0:1:42 2020-05-09 22:04:46 [INFO] [TRAIN] Epoch=9/12, Step=10/14, loss=0.709144, loss_cls=0.226779, loss_bbox=0.259028, loss_mask=0.15488, loss_rpn_cls=0.054622, loss_rpn_bbox=0.013834, lr=0.000125, time_each_step=0.31s, eta=0:1:41 2020-05-09 22:04:47 [INFO] [TRAIN] Epoch=9/12, Step=12/14, loss=0.646471, loss_cls=0.220824, loss_bbox=0.209546, loss_mask=0.183213, loss_rpn_cls=0.029907, loss_rpn_bbox=0.002981, lr=0.000125, time_each_step=0.31s, eta=0:1:41 2020-05-09 22:04:47 [INFO] [TRAIN] Epoch=9/12, Step=14/14, loss=0.523707, loss_cls=0.153719, loss_bbox=0.151527, loss_mask=0.165645, loss_rpn_cls=0.042186, loss_rpn_bbox=0.01063, lr=0.000125, time_each_step=0.31s, eta=0:1:40 2020-05-09 22:04:47 [INFO] [TRAIN] Epoch 9 finished, loss=0.64954, loss_cls=0.217007, loss_bbox=0.195664, loss_mask=0.173596, loss_rpn_cls=0.049308, loss_rpn_bbox=0.013965, lr=0.000125 . 2020-05-09 22:04:47 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.76it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.548 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.979 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.485 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.548 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.164 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.593 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.593 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.593 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.692 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.979 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.921 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.207 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.714 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.714 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.714 2020-05-09 22:04:49 [INFO] [EVAL] Finished, Epoch=9, bbox_mmap=0.548111, segm_mmap=0.691897 . 2020-05-09 22:04:56 [INFO] Model saved in output/mask_rcnn_r50_fpn/best_model. 2020-05-09 22:05:03 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_9. 2020-05-09 22:05:03 [INFO] Current evaluated best model in eval_dataset is epoch_9, bbox_mmap=0.5481106410236165 2020-05-09 22:05:07 [INFO] [TRAIN] Epoch=10/12, Step=2/14, loss=0.878359, loss_cls=0.352526, loss_bbox=0.178218, loss_mask=0.218055, loss_rpn_cls=0.084171, loss_rpn_bbox=0.045388, lr=0.000125, time_each_step=0.48s, eta=0:1:4 2020-05-09 22:05:07 [INFO] [TRAIN] Epoch=10/12, Step=4/14, loss=0.530076, loss_cls=0.167733, loss_bbox=0.149885, loss_mask=0.158529, loss_rpn_cls=0.04345, loss_rpn_bbox=0.010478, lr=0.000125, time_each_step=0.48s, eta=0:1:3 2020-05-09 22:05:07 [INFO] [TRAIN] Epoch=10/12, Step=6/14, loss=0.795024, loss_cls=0.24666, loss_bbox=0.273978, loss_mask=0.174272, loss_rpn_cls=0.075552, loss_rpn_bbox=0.024562, lr=0.000125, time_each_step=0.48s, eta=0:1:2 2020-05-09 22:05:07 [INFO] [TRAIN] Epoch=10/12, Step=8/14, loss=0.748986, loss_cls=0.26785, loss_bbox=0.247207, loss_mask=0.144817, loss_rpn_cls=0.069944, loss_rpn_bbox=0.019167, lr=0.000125, time_each_step=0.31s, eta=0:1:0 2020-05-09 22:05:08 [INFO] [TRAIN] Epoch=10/12, Step=10/14, loss=0.821939, loss_cls=0.271206, loss_bbox=0.283646, loss_mask=0.16433, loss_rpn_cls=0.08198, loss_rpn_bbox=0.020776, lr=0.000125, time_each_step=0.31s, eta=0:0:59 2020-05-09 22:05:08 [INFO] [TRAIN] Epoch=10/12, Step=12/14, loss=0.556871, loss_cls=0.197043, loss_bbox=0.142983, loss_mask=0.171168, loss_rpn_cls=0.039115, loss_rpn_bbox=0.006562, lr=0.000125, time_each_step=0.31s, eta=0:0:58 2020-05-09 22:05:08 [INFO] [TRAIN] Epoch=10/12, Step=14/14, loss=0.650385, loss_cls=0.209523, loss_bbox=0.176054, loss_mask=0.20007, loss_rpn_cls=0.054239, loss_rpn_bbox=0.0105, lr=0.000125, time_each_step=0.31s, eta=0:0:58 2020-05-09 22:05:08 [INFO] [TRAIN] Epoch 10 finished, loss=0.627058, loss_cls=0.213509, loss_bbox=0.188501, loss_mask=0.163813, loss_rpn_cls=0.047576, loss_rpn_bbox=0.013659, lr=0.000125 . 2020-05-09 22:05:08 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.84it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.454 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.969 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.227 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.454 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.129 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.493 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.536 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.536 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.680 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.969 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.938 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.682 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.207 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.714 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.729 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.729 2020-05-09 22:05:11 [INFO] [EVAL] Finished, Epoch=10, bbox_mmap=0.453593, segm_mmap=0.679966 . 2020-05-09 22:05:15 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_10. 2020-05-09 22:05:15 [INFO] Current evaluated best model in eval_dataset is epoch_9, bbox_mmap=0.5481106410236165 2020-05-09 22:05:17 [INFO] [TRAIN] Epoch=11/12, Step=2/14, loss=0.638564, loss_cls=0.212532, loss_bbox=0.180288, loss_mask=0.181051, loss_rpn_cls=0.054256, loss_rpn_bbox=0.010437, lr=0.000125, time_each_step=0.41s, eta=0:0:23 2020-05-09 22:05:18 [INFO] [TRAIN] Epoch=11/12, Step=4/14, loss=0.783331, loss_cls=0.250875, loss_bbox=0.278977, loss_mask=0.152205, loss_rpn_cls=0.081009, loss_rpn_bbox=0.020266, lr=0.000125, time_each_step=0.42s, eta=0:0:23 2020-05-09 22:05:18 [INFO] [TRAIN] Epoch=11/12, Step=6/14, loss=0.760373, loss_cls=0.206999, loss_bbox=0.271966, loss_mask=0.180214, loss_rpn_cls=0.076711, loss_rpn_bbox=0.024483, lr=0.000125, time_each_step=0.42s, eta=0:0:22 2020-05-09 22:05:18 [INFO] [TRAIN] Epoch=11/12, Step=8/14, loss=0.449934, loss_cls=0.1551, loss_bbox=0.109178, loss_mask=0.145627, loss_rpn_cls=0.031908, loss_rpn_bbox=0.008121, lr=0.000125, time_each_step=0.24s, eta=0:0:20 2020-05-09 22:05:18 [INFO] [TRAIN] Epoch=11/12, Step=10/14, loss=0.596698, loss_cls=0.194183, loss_bbox=0.194865, loss_mask=0.175785, loss_rpn_cls=0.029135, loss_rpn_bbox=0.002729, lr=0.000125, time_each_step=0.24s, eta=0:0:19 2020-05-09 22:05:19 [INFO] [TRAIN] Epoch=11/12, Step=12/14, loss=0.54638, loss_cls=0.164258, loss_bbox=0.158041, loss_mask=0.178691, loss_rpn_cls=0.033588, loss_rpn_bbox=0.011802, lr=0.000125, time_each_step=0.24s, eta=0:0:19 2020-05-09 22:05:19 [INFO] [TRAIN] Epoch=11/12, Step=14/14, loss=0.484299, loss_cls=0.142717, loss_bbox=0.12997, loss_mask=0.158404, loss_rpn_cls=0.043077, loss_rpn_bbox=0.010131, lr=0.000125, time_each_step=0.24s, eta=0:0:18 2020-05-09 22:05:19 [INFO] [TRAIN] Epoch 11 finished, loss=0.606633, loss_cls=0.199373, loss_bbox=0.181716, loss_mask=0.164135, loss_rpn_cls=0.047886, loss_rpn_bbox=0.013523, lr=0.000125 . 2020-05-09 22:05:19 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.61it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.514 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.330 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.514 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.143 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.564 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.564 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.564 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.693 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.207 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.721 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.721 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.721 2020-05-09 22:05:22 [INFO] [EVAL] Finished, Epoch=11, bbox_mmap=0.513749, segm_mmap=0.693476 . 2020-05-09 22:05:28 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_11. 2020-05-09 22:05:28 [INFO] Current evaluated best model in eval_dataset is epoch_9, bbox_mmap=0.5481106410236165 2020-05-09 22:05:32 [INFO] [TRAIN] Epoch=12/12, Step=2/14, loss=0.700711, loss_cls=0.248183, loss_bbox=0.225333, loss_mask=0.141736, loss_rpn_cls=0.066751, loss_rpn_bbox=0.018707, lr=1.2e-05, time_each_step=0.41s, eta=0:0:13 2020-05-09 22:05:32 [INFO] [TRAIN] Epoch=12/12, Step=4/14, loss=0.774726, loss_cls=0.249389, loss_bbox=0.269181, loss_mask=0.153597, loss_rpn_cls=0.082934, loss_rpn_bbox=0.019625, lr=1.2e-05, time_each_step=0.41s, eta=0:0:13 2020-05-09 22:05:32 [INFO] [TRAIN] Epoch=12/12, Step=6/14, loss=0.70865, loss_cls=0.274779, loss_bbox=0.243619, loss_mask=0.14248, loss_rpn_cls=0.040313, loss_rpn_bbox=0.007457, lr=1.2e-05, time_each_step=0.41s, eta=0:0:12 2020-05-09 22:05:32 [INFO] [TRAIN] Epoch=12/12, Step=8/14, loss=0.439049, loss_cls=0.155682, loss_bbox=0.096632, loss_mask=0.150002, loss_rpn_cls=0.028306, loss_rpn_bbox=0.008427, lr=1.2e-05, time_each_step=0.3s, eta=0:0:10 2020-05-09 22:05:33 [INFO] [TRAIN] Epoch=12/12, Step=10/14, loss=0.661962, loss_cls=0.205568, loss_bbox=0.233376, loss_mask=0.159011, loss_rpn_cls=0.051261, loss_rpn_bbox=0.012746, lr=1.2e-05, time_each_step=0.3s, eta=0:0:10 2020-05-09 22:05:33 [INFO] [TRAIN] Epoch=12/12, Step=12/14, loss=0.339072, loss_cls=0.090805, loss_bbox=0.090023, loss_mask=0.135592, loss_rpn_cls=0.018101, loss_rpn_bbox=0.004552, lr=1.2e-05, time_each_step=0.3s, eta=0:0:9 2020-05-09 22:05:33 [INFO] [TRAIN] Epoch=12/12, Step=14/14, loss=0.518044, loss_cls=0.181092, loss_bbox=0.136978, loss_mask=0.152139, loss_rpn_cls=0.041862, loss_rpn_bbox=0.005974, lr=1.2e-05, time_each_step=0.3s, eta=0:0:9 2020-05-09 22:05:33 [INFO] [TRAIN] Epoch 12 finished, loss=0.579536, loss_cls=0.192302, loss_bbox=0.173662, loss_mask=0.152211, loss_rpn_cls=0.047805, loss_rpn_bbox=0.013557, lr=1.2e-05 . 2020-05-09 22:05:33 [INFO] Start to evaluating(total_samples=4, total_steps=4)...
100%|██████████| 4/4 [00:02<00:00, 1.78it/s]
creating index... index created! Running per image evaluation... Evaluate annotation type *bbox* DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.514 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.330 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.514 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.143 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.564 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.564 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.564 creating index... index created! Running per image evaluation... Evaluate annotation type *segm* DONE (t=0.02s). Accumulating evaluation results... DONE (t=0.00s). Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.693 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.986 Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.693 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.207 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.721 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.721 Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.721 2020-05-09 22:05:36 [INFO] [EVAL] Finished, Epoch=12, bbox_mmap=0.513749, segm_mmap=0.693476 . 2020-05-09 22:05:40 [INFO] Model saved in output/mask_rcnn_r50_fpn/epoch_12. 2020-05-09 22:05:40 [INFO] Current evaluated best model in eval_dataset is epoch_9, bbox_mmap=0.5481106410236165
使用模型进行预测,同时使用pdx.det.visualize将结果可视化,可视化结果将保存到./output/mask_rcnn_r50_fpn下,其中threshold代表Box的置信度阈值,将Box置信度低于该阈值的框过滤不进行可视化。
image_name = 'xiaoduxiong_ins_det/JPEGImages/WechatIMG114.jpg'
result = model.predict(image_name)
pdx.det.visualize(image_name, result, threshold=0.5, save_dir='./output/mask_rcnn_r50_fpn')