TorchVision 0.3 Object Detection finetuning tutorial¶
For this tutorial, we will be finetuning a pre-trained Mask R-CNN model in the Penn-Fudan Database for Pedestrian Detection and Segmentation. It contains 170 images with 345 instances of pedestrians, and we will use it to illustrate how to use the new features in torchvision in order to train an instance segmentation model on a custom dataset.
First, we need to install pycocotools. This library will be used for computing the evaluation metrics following the COCO metric for intersection over union.
%%shell
CURRENT_DIR=`pwd`
echo $CURRENT_DIR
# Install pycocotools
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py build_ext install
cd $CURRENT_DIR
######################################################
# TODO remove this once torchvision 0.3 is present by
# default in Colab
######################################################
pip uninstall -y torchvision
git clone https://github.com/pytorch/vision.git
cd vision
git checkout v0.3.0
python setup.py install
# why do we need this?
cp -r build/lib.linux-x86_64-3.6/torchvision /usr/local/lib/python3.6/dist-packages/
/content Cloning into 'cocoapi'... remote: Enumerating objects: 953, done. remote: Total 953 (delta 0), reused 0 (delta 0), pack-reused 953 Receiving objects: 100% (953/953), 11.70 MiB | 29.29 MiB/s, done. Resolving deltas: 100% (566/566), done. running build_ext cythoning pycocotools/_mask.pyx to pycocotools/_mask.c /usr/local/lib/python3.6/dist-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /content/cocoapi/PythonAPI/pycocotools/_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension creating build creating build/common creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/pycocotools x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I../common -I/usr/include/python3.6m -c ../common/maskApi.c -o build/temp.linux-x86_64-3.6/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99 ../common/maskApi.c: In function ‘rleDecode’: ../common/maskApi.c:46:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for( k=0; k<R[i].cnts[j]; k++ ) *(M++)=v; v=!v; }} ^~~ ../common/maskApi.c:46:49: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ for( k=0; k<R[i].cnts[j]; k++ ) *(M++)=v; v=!v; }} ^ ../common/maskApi.c: In function ‘rleFrPoly’: ../common/maskApi.c:166:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for(j=0; j<k; j++) x[j]=(int)(scale*xy[j*2+0]+.5); x[k]=x[0]; ^~~ ../common/maskApi.c:166:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ for(j=0; j<k; j++) x[j]=(int)(scale*xy[j*2+0]+.5); x[k]=x[0]; ^ ../common/maskApi.c:167:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for(j=0; j<k; j++) y[j]=(int)(scale*xy[j*2+1]+.5); y[k]=y[0]; ^~~ ../common/maskApi.c:167:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ for(j=0; j<k; j++) y[j]=(int)(scale*xy[j*2+1]+.5); y[k]=y[0]; ^ ../common/maskApi.c: In function ‘rleToString’: ../common/maskApi.c:212:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(more) c |= 0x20; c+=48; s[p++]=c; ^~ ../common/maskApi.c:212:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ if(more) c |= 0x20; c+=48; s[p++]=c; ^ ../common/maskApi.c: In function ‘rleFrString’: ../common/maskApi.c:220:3: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0; ^~~~~ ../common/maskApi.c:220:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0; ^~~~ ../common/maskApi.c:228:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x; ^~ ../common/maskApi.c:228:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x; ^~~~ ../common/maskApi.c: In function ‘rleToBbox’: ../common/maskApi.c:141:31: warning: ‘xp’ may be used uninitialized in this function [-Wmaybe-uninitialized] if(j%2==0) xp=x; else if(xp<x) { ys=0; ye=h-1; } ^ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.6/dist-packages/numpy/core/include -I../common -I/usr/include/python3.6m -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.6/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99 creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/pycocotools x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/../common/maskApi.o build/temp.linux-x86_64-3.6/pycocotools/_mask.o -o build/lib.linux-x86_64-3.6/pycocotools/_mask.cpython-36m-x86_64-linux-gnu.so running install running bdist_egg running egg_info creating pycocotools.egg-info writing pycocotools.egg-info/PKG-INFO writing dependency_links to pycocotools.egg-info/dependency_links.txt writing requirements to pycocotools.egg-info/requires.txt writing top-level names to pycocotools.egg-info/top_level.txt writing manifest file 'pycocotools.egg-info/SOURCES.txt' writing manifest file 'pycocotools.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py copying pycocotools/coco.py -> build/lib.linux-x86_64-3.6/pycocotools copying pycocotools/__init__.py -> build/lib.linux-x86_64-3.6/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.6/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-3.6/pycocotools creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/pycocotools copying build/lib.linux-x86_64-3.6/pycocotools/coco.py -> build/bdist.linux-x86_64/egg/pycocotools copying build/lib.linux-x86_64-3.6/pycocotools/__init__.py -> build/bdist.linux-x86_64/egg/pycocotools copying build/lib.linux-x86_64-3.6/pycocotools/_mask.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/pycocotools copying build/lib.linux-x86_64-3.6/pycocotools/cocoeval.py -> build/bdist.linux-x86_64/egg/pycocotools copying build/lib.linux-x86_64-3.6/pycocotools/mask.py -> build/bdist.linux-x86_64/egg/pycocotools byte-compiling build/bdist.linux-x86_64/egg/pycocotools/coco.py to coco.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pycocotools/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pycocotools/cocoeval.py to cocoeval.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/pycocotools/mask.py to mask.cpython-36.pyc creating stub loader for pycocotools/_mask.cpython-36m-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/pycocotools/_mask.py to _mask.cpython-36.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying pycocotools.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying pycocotools.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pycocotools.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pycocotools.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying pycocotools.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycocotools.__pycache__._mask.cpython-36: module references __file__ creating dist creating 'dist/pycocotools-2.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing pycocotools-2.0-py3.6-linux-x86_64.egg creating /usr/local/lib/python3.6/dist-packages/pycocotools-2.0-py3.6-linux-x86_64.egg Extracting pycocotools-2.0-py3.6-linux-x86_64.egg to /usr/local/lib/python3.6/dist-packages Adding pycocotools 2.0 to easy-install.pth file Installed /usr/local/lib/python3.6/dist-packages/pycocotools-2.0-py3.6-linux-x86_64.egg Processing dependencies for pycocotools==2.0 Searching for matplotlib==3.0.3 Best match: matplotlib 3.0.3 Adding matplotlib 3.0.3 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for Cython==0.29.7 Best match: Cython 0.29.7 Adding Cython 0.29.7 to easy-install.pth file Installing cygdb script to /usr/local/bin Installing cython script to /usr/local/bin Installing cythonize script to /usr/local/bin Using /usr/local/lib/python3.6/dist-packages Searching for setuptools==41.0.1 Best match: setuptools 41.0.1 Adding setuptools 41.0.1 to easy-install.pth file Installing easy_install script to /usr/local/bin Installing easy_install-3.6 script to /usr/local/bin Using /usr/local/lib/python3.6/dist-packages Searching for python-dateutil==2.5.3 Best match: python-dateutil 2.5.3 Adding python-dateutil 2.5.3 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for cycler==0.10.0 Best match: cycler 0.10.0 Adding cycler 0.10.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for kiwisolver==1.1.0 Best match: kiwisolver 1.1.0 Adding kiwisolver 1.1.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for numpy==1.16.3 Best match: numpy 1.16.3 Adding numpy 1.16.3 to easy-install.pth file Installing f2py script to /usr/local/bin Installing f2py3 script to /usr/local/bin Installing f2py3.6 script to /usr/local/bin Using /usr/local/lib/python3.6/dist-packages Searching for pyparsing==2.4.0 Best match: pyparsing 2.4.0 Adding pyparsing 2.4.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for six==1.12.0 Best match: six 1.12.0 Adding six 1.12.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Finished processing dependencies for pycocotools==2.0 Uninstalling torchvision-0.2.2.post3: Successfully uninstalled torchvision-0.2.2.post3 Cloning into 'vision'... remote: Enumerating objects: 91, done. remote: Counting objects: 100% (91/91), done. remote: Compressing objects: 100% (58/58), done. remote: Total 3006 (delta 42), reused 68 (delta 33), pack-reused 2915 Receiving objects: 100% (3006/3006), 2.50 MiB | 16.98 MiB/s, done. Resolving deltas: 100% (1927/1927), done. Branch 'v0.3.0' set up to track remote branch 'v0.3.0' from 'origin'. Switched to a new branch 'v0.3.0' Building wheel torchvision-0.3.0a0+684c064 running install running bdist_egg running egg_info creating torchvision.egg-info writing torchvision.egg-info/PKG-INFO writing dependency_links to torchvision.egg-info/dependency_links.txt writing requirements to torchvision.egg-info/requires.txt writing top-level names to torchvision.egg-info/top_level.txt writing manifest file 'torchvision.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '__pycache__' found under directory '*' warning: no previously-included files matching '*.py[co]' found under directory '*' writing manifest file 'torchvision.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/torchvision copying torchvision/__init__.py -> build/lib.linux-x86_64-3.6/torchvision copying torchvision/utils.py -> build/lib.linux-x86_64-3.6/torchvision copying torchvision/version.py -> build/lib.linux-x86_64-3.6/torchvision creating build/lib.linux-x86_64-3.6/torchvision/transforms copying torchvision/transforms/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/transforms copying torchvision/transforms/functional.py -> build/lib.linux-x86_64-3.6/torchvision/transforms copying torchvision/transforms/transforms.py -> build/lib.linux-x86_64-3.6/torchvision/transforms creating build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/coco.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/mnist.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/phototour.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/sbu.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/stl10.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/omniglot.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/voc.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/semeion.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/vision.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/celeba.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/fakedata.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/imagenet.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/utils.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/cityscapes.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/caltech.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/svhn.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/sbd.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/cifar.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/flickr.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/lsun.py -> build/lib.linux-x86_64-3.6/torchvision/datasets copying torchvision/datasets/folder.py -> build/lib.linux-x86_64-3.6/torchvision/datasets creating build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/roi_align.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/boxes.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/poolers.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/misc.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/roi_pool.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/_utils.py -> build/lib.linux-x86_64-3.6/torchvision/ops copying torchvision/ops/feature_pyramid_network.py -> build/lib.linux-x86_64-3.6/torchvision/ops creating build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/inception.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/alexnet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/squeezenet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/vgg.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/googlenet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/densenet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/shufflenetv2.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/utils.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/mobilenet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/resnet.py -> build/lib.linux-x86_64-3.6/torchvision/models copying torchvision/models/_utils.py -> build/lib.linux-x86_64-3.6/torchvision/models creating build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/mask_rcnn.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/image_list.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/faster_rcnn.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/transform.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/generalized_rcnn.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/rpn.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/keypoint_rcnn.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/_utils.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/roi_heads.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection copying torchvision/models/detection/backbone_utils.py -> build/lib.linux-x86_64-3.6/torchvision/models/detection creating build/lib.linux-x86_64-3.6/torchvision/models/segmentation copying torchvision/models/segmentation/deeplabv3.py -> build/lib.linux-x86_64-3.6/torchvision/models/segmentation copying torchvision/models/segmentation/segmentation.py -> build/lib.linux-x86_64-3.6/torchvision/models/segmentation copying torchvision/models/segmentation/__init__.py -> build/lib.linux-x86_64-3.6/torchvision/models/segmentation copying torchvision/models/segmentation/fcn.py -> build/lib.linux-x86_64-3.6/torchvision/models/segmentation copying torchvision/models/segmentation/_utils.py -> build/lib.linux-x86_64-3.6/torchvision/models/segmentation running build_ext building 'torchvision._C' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/content creating build/temp.linux-x86_64-3.6/content/vision creating build/temp.linux-x86_64-3.6/content/vision/torchvision creating build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc creating build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu creating build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/vision.cpp -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/vision.o -O0 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/ROIAlign_cpu.o -O0 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9:0, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from /content/vision/torchvision/csrc/cpu/vision.h:2, from /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp:2: /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp: In lambda function: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:84:52: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] at::ScalarType _st = ::detail::scalar_type(TYPE); \ ^ /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp:406:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(input.type(), "ROIAlign_forward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:23: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp: In lambda function: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:84:52: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] at::ScalarType _st = ::detail::scalar_type(TYPE); \ ^ /content/vision/torchvision/csrc/cpu/ROIAlign_cpu.cpp:456:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(grad.type(), "ROIAlign_forward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:23: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cpu/nms_cpu.cpp -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/nms_cpu.o -O0 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9:0, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /usr/local/lib/python3.6/dist-packages/torch/include/torch/extension.h:4, from /content/vision/torchvision/csrc/cpu/vision.h:2, from /content/vision/torchvision/csrc/cpu/nms_cpu.cpp:1: /content/vision/torchvision/csrc/cpu/nms_cpu.cpp: In lambda function: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:71:52: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] at::ScalarType _st = ::detail::scalar_type(TYPE); \ ^ /content/vision/torchvision/csrc/cpu/nms_cpu.cpp:77:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’ AT_DISPATCH_FLOATING_TYPES(dets.type(), "nms", [&] { ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:23: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/ROIPool_cpu.o -O0 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from /usr/local/lib/python3.6/dist-packages/torch/include/ATen/ATen.h:9:0, from /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp:1: /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp: In lambda function: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:84:52: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] at::ScalarType _st = ::detail::scalar_type(TYPE); \ ^ /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp:152:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(input.type(), "ROIPool_forward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:23: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp: In lambda function: /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:84:52: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] at::ScalarType _st = ::detail::scalar_type(TYPE); \ ^ /content/vision/torchvision/csrc/cpu/ROIPool_cpu.cpp:206:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(grad.type(), "ROIPool_backward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:23: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cuda/ROIAlign_cuda.cu -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/ROIAlign_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(83): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lowest") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(84): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("max") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(85): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lower_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(86): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("upper_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /content/vision/torchvision/csrc/cuda/ROIAlign_cuda.cu: In lambda function: /content/vision/torchvision/csrc/cuda/ROIAlign_cuda.cu:337:120: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF(input.type(), "ROIAlign_forward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /content/vision/torchvision/csrc/cuda/ROIAlign_cuda.cu: In lambda function: /content/vision/torchvision/csrc/cuda/ROIAlign_cuda.cu:396:118: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF(grad.type(), "ROIAlign_backward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cuda/ROIPool_cuda.cu -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/ROIPool_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(83): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lowest") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(84): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("max") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(85): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lower_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(86): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("upper_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /content/vision/torchvision/csrc/cuda/ROIPool_cuda.cu: In lambda function: /content/vision/torchvision/csrc/cuda/ROIPool_cuda.cu:157:120: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF(input.type(), "ROIPool_forward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /content/vision/torchvision/csrc/cuda/ROIPool_cuda.cu: In lambda function: /content/vision/torchvision/csrc/cuda/ROIPool_cuda.cu:221:118: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF(grad.type(), "ROIPool_backward", [&] { ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ /usr/local/cuda/bin/nvcc -DWITH_CUDA -I/content/vision/torchvision/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /content/vision/torchvision/csrc/cuda/nms_cuda.cu -o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/nms_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(83): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lowest") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(84): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("max") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(85): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("lower_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /usr/local/lib/python3.6/dist-packages/torch/include/ATen/cuda/NumericLimits.cuh(86): warning: calling a constexpr __host__ function("from_bits") from a __host__ __device__ function("upper_bound") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. /content/vision/torchvision/csrc/cuda/nms_cuda.cu: In lambda function: /content/vision/torchvision/csrc/cuda/nms_cuda.cu:95:134: warning: ‘c10::ScalarType detail::scalar_type(const at::DeprecatedTypeProperties&)’ is deprecated [-Wdeprecated-declarations] AT_DISPATCH_FLOATING_TYPES_AND_HALF( ^ /usr/local/lib/python3.6/dist-packages/torch/include/ATen/Dispatch.h:47:1: note: declared here inline at::ScalarType scalar_type(const at::DeprecatedTypeProperties &t) { ^~~~~~~~~~~ x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/vision.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/ROIAlign_cpu.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/nms_cpu.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cpu/ROIPool_cpu.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/ROIAlign_cuda.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/ROIPool_cuda.o build/temp.linux-x86_64-3.6/content/vision/torchvision/csrc/cuda/nms_cuda.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/torchvision/_C.cpython-36m-x86_64-linux-gnu.so creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/torchvision copying build/lib.linux-x86_64-3.6/torchvision/__init__.py -> build/bdist.linux-x86_64/egg/torchvision creating build/bdist.linux-x86_64/egg/torchvision/transforms copying build/lib.linux-x86_64-3.6/torchvision/transforms/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/transforms copying build/lib.linux-x86_64-3.6/torchvision/transforms/functional.py -> build/bdist.linux-x86_64/egg/torchvision/transforms copying build/lib.linux-x86_64-3.6/torchvision/transforms/transforms.py -> build/bdist.linux-x86_64/egg/torchvision/transforms creating build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/coco.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/mnist.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/phototour.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/sbu.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/stl10.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/omniglot.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/voc.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/semeion.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/vision.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/celeba.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/fakedata.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/imagenet.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/utils.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/cityscapes.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/caltech.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/svhn.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/sbd.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/cifar.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/flickr.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/lsun.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/datasets/folder.py -> build/bdist.linux-x86_64/egg/torchvision/datasets copying build/lib.linux-x86_64-3.6/torchvision/_C.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg/torchvision creating build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/roi_align.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/boxes.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/poolers.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/misc.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/roi_pool.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/_utils.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/ops/feature_pyramid_network.py -> build/bdist.linux-x86_64/egg/torchvision/ops copying build/lib.linux-x86_64-3.6/torchvision/utils.py -> build/bdist.linux-x86_64/egg/torchvision copying build/lib.linux-x86_64-3.6/torchvision/version.py -> build/bdist.linux-x86_64/egg/torchvision creating build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/inception.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/alexnet.py -> build/bdist.linux-x86_64/egg/torchvision/models creating build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/mask_rcnn.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/image_list.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/faster_rcnn.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/transform.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/generalized_rcnn.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/rpn.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/keypoint_rcnn.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/_utils.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/roi_heads.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/detection/backbone_utils.py -> build/bdist.linux-x86_64/egg/torchvision/models/detection copying build/lib.linux-x86_64-3.6/torchvision/models/squeezenet.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/vgg.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/googlenet.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/densenet.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/shufflenetv2.py -> build/bdist.linux-x86_64/egg/torchvision/models creating build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/segmentation/deeplabv3.py -> build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/segmentation/segmentation.py -> build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/segmentation/__init__.py -> build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/segmentation/fcn.py -> build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/segmentation/_utils.py -> build/bdist.linux-x86_64/egg/torchvision/models/segmentation copying build/lib.linux-x86_64-3.6/torchvision/models/utils.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/mobilenet.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/resnet.py -> build/bdist.linux-x86_64/egg/torchvision/models copying build/lib.linux-x86_64-3.6/torchvision/models/_utils.py -> build/bdist.linux-x86_64/egg/torchvision/models byte-compiling build/bdist.linux-x86_64/egg/torchvision/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/transforms/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/transforms/functional.py to functional.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/transforms/transforms.py to transforms.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/coco.py to coco.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/mnist.py to mnist.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/phototour.py to phototour.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/sbu.py to sbu.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/stl10.py to stl10.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/omniglot.py to omniglot.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/voc.py to voc.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/semeion.py to semeion.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/vision.py to vision.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/celeba.py to celeba.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/fakedata.py to fakedata.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/imagenet.py to imagenet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/utils.py to utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/cityscapes.py to cityscapes.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/caltech.py to caltech.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/svhn.py to svhn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/sbd.py to sbd.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/cifar.py to cifar.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/flickr.py to flickr.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/lsun.py to lsun.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/datasets/folder.py to folder.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/roi_align.py to roi_align.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/boxes.py to boxes.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/poolers.py to poolers.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/misc.py to misc.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/roi_pool.py to roi_pool.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/_utils.py to _utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/ops/feature_pyramid_network.py to feature_pyramid_network.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/utils.py to utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/version.py to version.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/inception.py to inception.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/alexnet.py to alexnet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/mask_rcnn.py to mask_rcnn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/image_list.py to image_list.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/faster_rcnn.py to faster_rcnn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/transform.py to transform.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/generalized_rcnn.py to generalized_rcnn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/rpn.py to rpn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/keypoint_rcnn.py to keypoint_rcnn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/_utils.py to _utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/roi_heads.py to roi_heads.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/detection/backbone_utils.py to backbone_utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/squeezenet.py to squeezenet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/vgg.py to vgg.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/googlenet.py to googlenet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/densenet.py to densenet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/shufflenetv2.py to shufflenetv2.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/segmentation/deeplabv3.py to deeplabv3.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/segmentation/segmentation.py to segmentation.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/segmentation/__init__.py to __init__.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/segmentation/fcn.py to fcn.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/segmentation/_utils.py to _utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/utils.py to utils.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/mobilenet.py to mobilenet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/resnet.py to resnet.cpython-36.pyc byte-compiling build/bdist.linux-x86_64/egg/torchvision/models/_utils.py to _utils.cpython-36.pyc creating stub loader for torchvision/_C.cpython-36m-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/torchvision/_C.py to _C.cpython-36.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying torchvision.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt creating dist creating 'dist/torchvision-0.3.0a0+684c064-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing torchvision-0.3.0a0+684c064-py3.6-linux-x86_64.egg Copying torchvision-0.3.0a0+684c064-py3.6-linux-x86_64.egg to /usr/local/lib/python3.6/dist-packages Adding torchvision 0.3.0a0+684c064 to easy-install.pth file Installed /usr/local/lib/python3.6/dist-packages/torchvision-0.3.0a0+684c064-py3.6-linux-x86_64.egg Processing dependencies for torchvision==0.3.0a0+684c064 Searching for Pillow==4.3.0 Best match: Pillow 4.3.0 Adding Pillow 4.3.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for torch==1.1.0 Best match: torch 1.1.0 Adding torch 1.1.0 to easy-install.pth file Installing convert-caffe2-to-onnx script to /usr/local/bin Installing convert-onnx-to-caffe2 script to /usr/local/bin Using /usr/local/lib/python3.6/dist-packages Searching for six==1.12.0 Best match: six 1.12.0 Adding six 1.12.0 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Searching for numpy==1.16.3 Best match: numpy 1.16.3 Adding numpy 1.16.3 to easy-install.pth file Installing f2py script to /usr/local/bin Installing f2py3 script to /usr/local/bin Installing f2py3.6 script to /usr/local/bin Using /usr/local/lib/python3.6/dist-packages Searching for olefile==0.46 Best match: olefile 0.46 Adding olefile 0.46 to easy-install.pth file Using /usr/local/lib/python3.6/dist-packages Finished processing dependencies for torchvision==0.3.0a0+684c064
Defining the Dataset¶
The torchvision reference scripts for training object detection, instance segmentation and person keypoint detection allows for easily supporting adding new custom datasets.
The dataset should inherit from the standard torch.utils.data.Dataset class, and implement __len__ and __getitem__.
The only specificity that we require is that the dataset __getitem__ should return:
- image: a PIL Image of size (H, W)
- target: a dict containing the following fields
boxes(FloatTensor[N, 4]): the coordinates of theNbounding boxes in[x0, y0, x1, y1]format, ranging from0toWand0toHlabels(Int64Tensor[N]): the label for each bounding boximage_id(Int64Tensor[1]): an image identifier. It should be unique between all the images in the dataset, and is used during evaluationarea(Tensor[N]): The area of the bounding box. This is used during evaluation with the COCO metric, to separate the metric scores between small, medium and large boxes.iscrowd(UInt8Tensor[N]): instances withiscrowd=Truewill be ignored during evaluation.- (optionally)
masks(UInt8Tensor[N, H, W]): The segmentation masks for each one of the objects - (optionally)
keypoints(FloatTensor[N, K, 3]): For each one of theNobjects, it contains theKkeypoints in[x, y, visibility]format, defining the object.visibility=0means that the keypoint is not visible. Note that for data augmentation, the notion of flipping a keypoint is dependent on the data representation, and you should probably adaptreferences/detection/transforms.pyfor your new keypoint representation
If your model returns the above methods, they will make it work for both training and evaluation, and will use the evaluation scripts from pycocotools.
Additionally, if you want to use aspect ratio grouping during training (so that each batch only contains images with similar aspect ratio), then it is recommended to also implement a get_height_and_width method, which returns the height and the width of the image. If this method is not provided, we query all elements of the dataset via __getitem__ , which loads the image in memory and is slower than if a custom method is provided.
Writing a custom dataset for Penn-Fudan¶
Let's write a dataset for the Penn-Fudan dataset.
First, let's download and extract the data, present in a zip file at https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip
%%shell
# download the Penn-Fudan dataset
wget https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip .
# extract it in the current folder
unzip PennFudanPed.zip
--2019-05-22 13:33:18-- https://www.cis.upenn.edu/~jshi/ped_html/PennFudanPed.zip Resolving www.cis.upenn.edu (www.cis.upenn.edu)... 158.130.69.163, 2607:f470:8:64:5ea5::d Connecting to www.cis.upenn.edu (www.cis.upenn.edu)|158.130.69.163|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 53723336 (51M) [application/zip] Saving to: ‘PennFudanPed.zip’ PennFudanPed.zip 100%[===================>] 51.23M 65.0MB/s in 0.8s 2019-05-22 13:33:19 (65.0 MB/s) - ‘PennFudanPed.zip’ saved [53723336/53723336] --2019-05-22 13:33:19-- http://./ Resolving . (.)... failed: No address associated with hostname. wget: unable to resolve host address ‘.’ FINISHED --2019-05-22 13:33:19-- Total wall clock time: 1.0s Downloaded: 1 files, 51M in 0.8s (65.0 MB/s) Archive: PennFudanPed.zip creating: PennFudanPed/ inflating: PennFudanPed/added-object-list.txt creating: PennFudanPed/Annotation/ inflating: PennFudanPed/Annotation/FudanPed00001.txt inflating: PennFudanPed/Annotation/FudanPed00002.txt inflating: PennFudanPed/Annotation/FudanPed00003.txt inflating: PennFudanPed/Annotation/FudanPed00004.txt inflating: PennFudanPed/Annotation/FudanPed00005.txt inflating: PennFudanPed/Annotation/FudanPed00006.txt inflating: PennFudanPed/Annotation/FudanPed00007.txt inflating: PennFudanPed/Annotation/FudanPed00008.txt inflating: PennFudanPed/Annotation/FudanPed00009.txt inflating: PennFudanPed/Annotation/FudanPed00010.txt inflating: PennFudanPed/Annotation/FudanPed00011.txt inflating: PennFudanPed/Annotation/FudanPed00012.txt inflating: PennFudanPed/Annotation/FudanPed00013.txt inflating: PennFudanPed/Annotation/FudanPed00014.txt inflating: PennFudanPed/Annotation/FudanPed00015.txt inflating: PennFudanPed/Annotation/FudanPed00016.txt inflating: PennFudanPed/Annotation/FudanPed00017.txt inflating: PennFudanPed/Annotation/FudanPed00018.txt inflating: PennFudanPed/Annotation/FudanPed00019.txt inflating: PennFudanPed/Annotation/FudanPed00020.txt inflating: PennFudanPed/Annotation/FudanPed00021.txt inflating: PennFudanPed/Annotation/FudanPed00022.txt inflating: PennFudanPed/Annotation/FudanPed00023.txt inflating: PennFudanPed/Annotation/FudanPed00024.txt inflating: PennFudanPed/Annotation/FudanPed00025.txt inflating: PennFudanPed/Annotation/FudanPed00026.txt inflating: PennFudanPed/Annotation/FudanPed00027.txt inflating: PennFudanPed/Annotation/FudanPed00028.txt inflating: PennFudanPed/Annotation/FudanPed00029.txt inflating: PennFudanPed/Annotation/FudanPed00030.txt inflating: PennFudanPed/Annotation/FudanPed00031.txt inflating: PennFudanPed/Annotation/FudanPed00032.txt inflating: PennFudanPed/Annotation/FudanPed00033.txt inflating: PennFudanPed/Annotation/FudanPed00034.txt inflating: PennFudanPed/Annotation/FudanPed00035.txt inflating: PennFudanPed/Annotation/FudanPed00036.txt inflating: PennFudanPed/Annotation/FudanPed00037.txt inflating: PennFudanPed/Annotation/FudanPed00038.txt inflating: PennFudanPed/Annotation/FudanPed00039.txt inflating: PennFudanPed/Annotation/FudanPed00040.txt inflating: PennFudanPed/Annotation/FudanPed00041.txt inflating: PennFudanPed/Annotation/FudanPed00042.txt inflating: PennFudanPed/Annotation/FudanPed00043.txt inflating: PennFudanPed/Annotation/FudanPed00044.txt inflating: PennFudanPed/Annotation/FudanPed00045.txt inflating: PennFudanPed/Annotation/FudanPed00046.txt inflating: PennFudanPed/Annotation/FudanPed00047.txt inflating: PennFudanPed/Annotation/FudanPed00048.txt inflating: PennFudanPed/Annotation/FudanPed00049.txt inflating: PennFudanPed/Annotation/FudanPed00050.txt inflating: PennFudanPed/Annotation/FudanPed00051.txt inflating: PennFudanPed/Annotation/FudanPed00052.txt inflating: PennFudanPed/Annotation/FudanPed00053.txt inflating: PennFudanPed/Annotation/FudanPed00054.txt inflating: PennFudanPed/Annotation/FudanPed00055.txt inflating: PennFudanPed/Annotation/FudanPed00056.txt inflating: PennFudanPed/Annotation/FudanPed00057.txt inflating: PennFudanPed/Annotation/FudanPed00058.txt inflating: PennFudanPed/Annotation/FudanPed00059.txt inflating: PennFudanPed/Annotation/FudanPed00060.txt inflating: PennFudanPed/Annotation/FudanPed00061.txt inflating: PennFudanPed/Annotation/FudanPed00062.txt inflating: PennFudanPed/Annotation/FudanPed00063.txt inflating: PennFudanPed/Annotation/FudanPed00064.txt inflating: PennFudanPed/Annotation/FudanPed00065.txt inflating: PennFudanPed/Annotation/FudanPed00066.txt inflating: PennFudanPed/Annotation/FudanPed00067.txt inflating: PennFudanPed/Annotation/FudanPed00068.txt inflating: PennFudanPed/Annotation/FudanPed00069.txt inflating: PennFudanPed/Annotation/FudanPed00070.txt inflating: PennFudanPed/Annotation/FudanPed00071.txt inflating: PennFudanPed/Annotation/FudanPed00072.txt inflating: PennFudanPed/Annotation/FudanPed00073.txt inflating: PennFudanPed/Annotation/FudanPed00074.txt inflating: PennFudanPed/Annotation/PennPed00001.txt inflating: PennFudanPed/Annotation/PennPed00002.txt inflating: PennFudanPed/Annotation/PennPed00003.txt inflating: PennFudanPed/Annotation/PennPed00004.txt inflating: PennFudanPed/Annotation/PennPed00005.txt inflating: PennFudanPed/Annotation/PennPed00006.txt inflating: PennFudanPed/Annotation/PennPed00007.txt inflating: PennFudanPed/Annotation/PennPed00008.txt inflating: PennFudanPed/Annotation/PennPed00009.txt inflating: PennFudanPed/Annotation/PennPed00010.txt inflating: PennFudanPed/Annotation/PennPed00011.txt inflating: PennFudanPed/Annotation/PennPed00012.txt inflating: PennFudanPed/Annotation/PennPed00013.txt inflating: PennFudanPed/Annotation/PennPed00014.txt inflating: PennFudanPed/Annotation/PennPed00015.txt inflating: PennFudanPed/Annotation/PennPed00016.txt inflating: PennFudanPed/Annotation/PennPed00017.txt inflating: PennFudanPed/Annotation/PennPed00018.txt inflating: PennFudanPed/Annotation/PennPed00019.txt inflating: PennFudanPed/Annotation/PennPed00020.txt inflating: PennFudanPed/Annotation/PennPed00021.txt inflating: PennFudanPed/Annotation/PennPed00022.txt inflating: PennFudanPed/Annotation/PennPed00023.txt inflating: PennFudanPed/Annotation/PennPed00024.txt inflating: PennFudanPed/Annotation/PennPed00025.txt inflating: PennFudanPed/Annotation/PennPed00026.txt inflating: PennFudanPed/Annotation/PennPed00027.txt inflating: PennFudanPed/Annotation/PennPed00028.txt inflating: PennFudanPed/Annotation/PennPed00029.txt inflating: PennFudanPed/Annotation/PennPed00030.txt inflating: PennFudanPed/Annotation/PennPed00031.txt inflating: PennFudanPed/Annotation/PennPed00032.txt inflating: PennFudanPed/Annotation/PennPed00033.txt inflating: PennFudanPed/Annotation/PennPed00034.txt inflating: PennFudanPed/Annotation/PennPed00035.txt inflating: PennFudanPed/Annotation/PennPed00036.txt inflating: PennFudanPed/Annotation/PennPed00037.txt inflating: PennFudanPed/Annotation/PennPed00038.txt inflating: PennFudanPed/Annotation/PennPed00039.txt inflating: PennFudanPed/Annotation/PennPed00040.txt inflating: PennFudanPed/Annotation/PennPed00041.txt inflating: PennFudanPed/Annotation/PennPed00042.txt inflating: PennFudanPed/Annotation/PennPed00043.txt inflating: PennFudanPed/Annotation/PennPed00044.txt inflating: PennFudanPed/Annotation/PennPed00045.txt inflating: PennFudanPed/Annotation/PennPed00046.txt inflating: PennFudanPed/Annotation/PennPed00047.txt inflating: PennFudanPed/Annotation/PennPed00048.txt inflating: PennFudanPed/Annotation/PennPed00049.txt inflating: PennFudanPed/Annotation/PennPed00050.txt inflating: PennFudanPed/Annotation/PennPed00051.txt inflating: PennFudanPed/Annotation/PennPed00052.txt inflating: PennFudanPed/Annotation/PennPed00053.txt inflating: PennFudanPed/Annotation/PennPed00054.txt inflating: PennFudanPed/Annotation/PennPed00055.txt inflating: PennFudanPed/Annotation/PennPed00056.txt inflating: PennFudanPed/Annotation/PennPed00057.txt inflating: PennFudanPed/Annotation/PennPed00058.txt inflating: PennFudanPed/Annotation/PennPed00059.txt inflating: PennFudanPed/Annotation/PennPed00060.txt inflating: PennFudanPed/Annotation/PennPed00061.txt inflating: PennFudanPed/Annotation/PennPed00062.txt inflating: PennFudanPed/Annotation/PennPed00063.txt inflating: PennFudanPed/Annotation/PennPed00064.txt inflating: PennFudanPed/Annotation/PennPed00065.txt inflating: PennFudanPed/Annotation/PennPed00066.txt inflating: PennFudanPed/Annotation/PennPed00067.txt inflating: PennFudanPed/Annotation/PennPed00068.txt inflating: PennFudanPed/Annotation/PennPed00069.txt inflating: PennFudanPed/Annotation/PennPed00070.txt inflating: PennFudanPed/Annotation/PennPed00071.txt inflating: PennFudanPed/Annotation/PennPed00072.txt inflating: PennFudanPed/Annotation/PennPed00073.txt inflating: PennFudanPed/Annotation/PennPed00074.txt inflating: PennFudanPed/Annotation/PennPed00075.txt inflating: PennFudanPed/Annotation/PennPed00076.txt inflating: PennFudanPed/Annotation/PennPed00077.txt inflating: PennFudanPed/Annotation/PennPed00078.txt inflating: PennFudanPed/Annotation/PennPed00079.txt inflating: PennFudanPed/Annotation/PennPed00080.txt inflating: PennFudanPed/Annotation/PennPed00081.txt inflating: PennFudanPed/Annotation/PennPed00082.txt inflating: PennFudanPed/Annotation/PennPed00083.txt inflating: PennFudanPed/Annotation/PennPed00084.txt inflating: PennFudanPed/Annotation/PennPed00085.txt inflating: PennFudanPed/Annotation/PennPed00086.txt inflating: PennFudanPed/Annotation/PennPed00087.txt inflating: PennFudanPed/Annotation/PennPed00088.txt inflating: PennFudanPed/Annotation/PennPed00089.txt inflating: PennFudanPed/Annotation/PennPed00090.txt inflating: PennFudanPed/Annotation/PennPed00091.txt inflating: PennFudanPed/Annotation/PennPed00092.txt inflating: PennFudanPed/Annotation/PennPed00093.txt inflating: PennFudanPed/Annotation/PennPed00094.txt inflating: PennFudanPed/Annotation/PennPed00095.txt inflating: PennFudanPed/Annotation/PennPed00096.txt creating: PennFudanPed/PedMasks/ inflating: PennFudanPed/PedMasks/FudanPed00001_mask.png inflating: PennFudanPed/PedMasks/FudanPed00002_mask.png inflating: PennFudanPed/PedMasks/FudanPed00003_mask.png inflating: PennFudanPed/PedMasks/FudanPed00004_mask.png inflating: PennFudanPed/PedMasks/FudanPed00005_mask.png inflating: PennFudanPed/PedMasks/FudanPed00006_mask.png inflating: PennFudanPed/PedMasks/FudanPed00007_mask.png inflating: PennFudanPed/PedMasks/FudanPed00008_mask.png inflating: PennFudanPed/PedMasks/FudanPed00009_mask.png inflating: PennFudanPed/PedMasks/FudanPed00010_mask.png inflating: PennFudanPed/PedMasks/FudanPed00011_mask.png inflating: PennFudanPed/PedMasks/FudanPed00012_mask.png inflating: PennFudanPed/PedMasks/FudanPed00013_mask.png inflating: PennFudanPed/PedMasks/FudanPed00014_mask.png extracting: PennFudanPed/PedMasks/FudanPed00015_mask.png inflating: PennFudanPed/PedMasks/FudanPed00016_mask.png inflating: PennFudanPed/PedMasks/FudanPed00017_mask.png extracting: PennFudanPed/PedMasks/FudanPed00018_mask.png inflating: PennFudanPed/PedMasks/FudanPed00019_mask.png inflating: PennFudanPed/PedMasks/FudanPed00020_mask.png inflating: PennFudanPed/PedMasks/FudanPed00021_mask.png inflating: PennFudanPed/PedMasks/FudanPed00022_mask.png inflating: PennFudanPed/PedMasks/FudanPed00023_mask.png inflating: PennFudanPed/PedMasks/FudanPed00024_mask.png inflating: PennFudanPed/PedMasks/FudanPed00025_mask.png inflating: PennFudanPed/PedMasks/FudanPed00026_mask.png inflating: PennFudanPed/PedMasks/FudanPed00027_mask.png extracting: PennFudanPed/PedMasks/FudanPed00028_mask.png inflating: PennFudanPed/PedMasks/FudanPed00029_mask.png inflating: PennFudanPed/PedMasks/FudanPed00030_mask.png inflating: PennFudanPed/PedMasks/FudanPed00031_mask.png inflating: PennFudanPed/PedMasks/FudanPed00032_mask.png inflating: PennFudanPed/PedMasks/FudanPed00033_mask.png inflating: PennFudanPed/PedMasks/FudanPed00034_mask.png inflating: PennFudanPed/PedMasks/FudanPed00035_mask.png inflating: PennFudanPed/PedMasks/FudanPed00036_mask.png inflating: PennFudanPed/PedMasks/FudanPed00037_mask.png inflating: PennFudanPed/PedMasks/FudanPed00038_mask.png inflating: PennFudanPed/PedMasks/FudanPed00039_mask.png inflating: PennFudanPed/PedMasks/FudanPed00040_mask.png inflating: PennFudanPed/PedMasks/FudanPed00041_mask.png inflating: PennFudanPed/PedMasks/FudanPed00042_mask.png inflating: PennFudanPed/PedMasks/FudanPed00043_mask.png inflating: PennFudanPed/PedMasks/FudanPed00044_mask.png inflating: PennFudanPed/PedMasks/FudanPed00045_mask.png inflating: PennFudanPed/PedMasks/FudanPed00046_mask.png inflating: PennFudanPed/PedMasks/FudanPed00047_mask.png inflating: PennFudanPed/PedMasks/FudanPed00048_mask.png inflating: PennFudanPed/PedMasks/FudanPed00049_mask.png inflating: PennFudanPed/PedMasks/FudanPed00050_mask.png inflating: PennFudanPed/PedMasks/FudanPed00051_mask.png inflating: PennFudanPed/PedMasks/FudanPed00052_mask.png inflating: PennFudanPed/PedMasks/FudanPed00053_mask.png inflating: PennFudanPed/PedMasks/FudanPed00054_mask.png inflating: PennFudanPed/PedMasks/FudanPed00055_mask.png inflating: PennFudanPed/PedMasks/FudanPed00056_mask.png inflating: PennFudanPed/PedMasks/FudanPed00057_mask.png inflating: PennFudanPed/PedMasks/FudanPed00058_mask.png inflating: PennFudanPed/PedMasks/FudanPed00059_mask.png inflating: PennFudanPed/PedMasks/FudanPed00060_mask.png inflating: PennFudanPed/PedMasks/FudanPed00061_mask.png inflating: PennFudanPed/PedMasks/FudanPed00062_mask.png inflating: PennFudanPed/PedMasks/FudanPed00063_mask.png inflating: PennFudanPed/PedMasks/FudanPed00064_mask.png inflating: PennFudanPed/PedMasks/FudanPed00065_mask.png inflating: PennFudanPed/PedMasks/FudanPed00066_mask.png inflating: PennFudanPed/PedMasks/FudanPed00067_mask.png inflating: PennFudanPed/PedMasks/FudanPed00068_mask.png inflating: PennFudanPed/PedMasks/FudanPed00069_mask.png inflating: PennFudanPed/PedMasks/FudanPed00070_mask.png inflating: PennFudanPed/PedMasks/FudanPed00071_mask.png inflating: PennFudanPed/PedMasks/FudanPed00072_mask.png inflating: PennFudanPed/PedMasks/FudanPed00073_mask.png inflating: PennFudanPed/PedMasks/FudanPed00074_mask.png inflating: PennFudanPed/PedMasks/PennPed00001_mask.png inflating: PennFudanPed/PedMasks/PennPed00002_mask.png inflating: PennFudanPed/PedMasks/PennPed00003_mask.png inflating: PennFudanPed/PedMasks/PennPed00004_mask.png inflating: PennFudanPed/PedMasks/PennPed00005_mask.png inflating: PennFudanPed/PedMasks/PennPed00006_mask.png inflating: PennFudanPed/PedMasks/PennPed00007_mask.png inflating: PennFudanPed/PedMasks/PennPed00008_mask.png inflating: PennFudanPed/PedMasks/PennPed00009_mask.png inflating: PennFudanPed/PedMasks/PennPed00010_mask.png inflating: PennFudanPed/PedMasks/PennPed00011_mask.png inflating: PennFudanPed/PedMasks/PennPed00012_mask.png inflating: PennFudanPed/PedMasks/PennPed00013_mask.png inflating: PennFudanPed/PedMasks/PennPed00014_mask.png inflating: PennFudanPed/PedMasks/PennPed00015_mask.png inflating: PennFudanPed/PedMasks/PennPed00016_mask.png inflating: PennFudanPed/PedMasks/PennPed00017_mask.png inflating: PennFudanPed/PedMasks/PennPed00018_mask.png inflating: PennFudanPed/PedMasks/PennPed00019_mask.png inflating: PennFudanPed/PedMasks/PennPed00020_mask.png inflating: PennFudanPed/PedMasks/PennPed00021_mask.png inflating: PennFudanPed/PedMasks/PennPed00022_mask.png inflating: PennFudanPed/PedMasks/PennPed00023_mask.png inflating: PennFudanPed/PedMasks/PennPed00024_mask.png inflating: PennFudanPed/PedMasks/PennPed00025_mask.png inflating: PennFudanPed/PedMasks/PennPed00026_mask.png inflating: PennFudanPed/PedMasks/PennPed00027_mask.png inflating: PennFudanPed/PedMasks/PennPed00028_mask.png inflating: PennFudanPed/PedMasks/PennPed00029_mask.png inflating: PennFudanPed/PedMasks/PennPed00030_mask.png inflating: PennFudanPed/PedMasks/PennPed00031_mask.png inflating: PennFudanPed/PedMasks/PennPed00032_mask.png inflating: PennFudanPed/PedMasks/PennPed00033_mask.png inflating: PennFudanPed/PedMasks/PennPed00034_mask.png inflating: PennFudanPed/PedMasks/PennPed00035_mask.png inflating: PennFudanPed/PedMasks/PennPed00036_mask.png inflating: PennFudanPed/PedMasks/PennPed00037_mask.png inflating: PennFudanPed/PedMasks/PennPed00038_mask.png inflating: PennFudanPed/PedMasks/PennPed00039_mask.png inflating: PennFudanPed/PedMasks/PennPed00040_mask.png inflating: PennFudanPed/PedMasks/PennPed00041_mask.png inflating: PennFudanPed/PedMasks/PennPed00042_mask.png inflating: PennFudanPed/PedMasks/PennPed00043_mask.png inflating: PennFudanPed/PedMasks/PennPed00044_mask.png inflating: PennFudanPed/PedMasks/PennPed00045_mask.png inflating: PennFudanPed/PedMasks/PennPed00046_mask.png inflating: PennFudanPed/PedMasks/PennPed00047_mask.png inflating: PennFudanPed/PedMasks/PennPed00048_mask.png inflating: PennFudanPed/PedMasks/PennPed00049_mask.png inflating: PennFudanPed/PedMasks/PennPed00050_mask.png inflating: PennFudanPed/PedMasks/PennPed00051_mask.png inflating: PennFudanPed/PedMasks/PennPed00052_mask.png extracting: PennFudanPed/PedMasks/PennPed00053_mask.png inflating: PennFudanPed/PedMasks/PennPed00054_mask.png inflating: PennFudanPed/PedMasks/PennPed00055_mask.png inflating: PennFudanPed/PedMasks/PennPed00056_mask.png inflating: PennFudanPed/PedMasks/PennPed00057_mask.png inflating: PennFudanPed/PedMasks/PennPed00058_mask.png inflating: PennFudanPed/PedMasks/PennPed00059_mask.png inflating: PennFudanPed/PedMasks/PennPed00060_mask.png inflating: PennFudanPed/PedMasks/PennPed00061_mask.png extracting: PennFudanPed/PedMasks/PennPed00062_mask.png inflating: PennFudanPed/PedMasks/PennPed00063_mask.png inflating: PennFudanPed/PedMasks/PennPed00064_mask.png inflating: PennFudanPed/PedMasks/PennPed00065_mask.png extracting: PennFudanPed/PedMasks/PennPed00066_mask.png inflating: PennFudanPed/PedMasks/PennPed00067_mask.png inflating: PennFudanPed/PedMasks/PennPed00068_mask.png extracting: PennFudanPed/PedMasks/PennPed00069_mask.png extracting: PennFudanPed/PedMasks/PennPed00070_mask.png inflating: PennFudanPed/PedMasks/PennPed00071_mask.png extracting: PennFudanPed/PedMasks/PennPed00072_mask.png inflating: PennFudanPed/PedMasks/PennPed00073_mask.png extracting: PennFudanPed/PedMasks/PennPed00074_mask.png inflating: PennFudanPed/PedMasks/PennPed00075_mask.png inflating: PennFudanPed/PedMasks/PennPed00076_mask.png inflating: PennFudanPed/PedMasks/PennPed00077_mask.png inflating: PennFudanPed/PedMasks/PennPed00078_mask.png inflating: PennFudanPed/PedMasks/PennPed00079_mask.png inflating: PennFudanPed/PedMasks/PennPed00080_mask.png inflating: PennFudanPed/PedMasks/PennPed00081_mask.png inflating: PennFudanPed/PedMasks/PennPed00082_mask.png extracting: PennFudanPed/PedMasks/PennPed00083_mask.png extracting: PennFudanPed/PedMasks/PennPed00084_mask.png inflating: PennFudanPed/PedMasks/PennPed00085_mask.png extracting: PennFudanPed/PedMasks/PennPed00086_mask.png inflating: PennFudanPed/PedMasks/PennPed00087_mask.png inflating: PennFudanPed/PedMasks/PennPed00088_mask.png extracting: PennFudanPed/PedMasks/PennPed00089_mask.png extracting: PennFudanPed/PedMasks/PennPed00090_mask.png inflating: PennFudanPed/PedMasks/PennPed00091_mask.png inflating: PennFudanPed/PedMasks/PennPed00092_mask.png inflating: PennFudanPed/PedMasks/PennPed00093_mask.png inflating: PennFudanPed/PedMasks/PennPed00094_mask.png inflating: PennFudanPed/PedMasks/PennPed00095_mask.png extracting: PennFudanPed/PedMasks/PennPed00096_mask.png creating: PennFudanPed/PNGImages/ inflating: PennFudanPed/PNGImages/FudanPed00001.png inflating: PennFudanPed/PNGImages/FudanPed00002.png inflating: PennFudanPed/PNGImages/FudanPed00003.png inflating: PennFudanPed/PNGImages/FudanPed00004.png inflating: PennFudanPed/PNGImages/FudanPed00005.png inflating: PennFudanPed/PNGImages/FudanPed00006.png inflating: PennFudanPed/PNGImages/FudanPed00007.png inflating: PennFudanPed/PNGImages/FudanPed00008.png inflating: PennFudanPed/PNGImages/FudanPed00009.png inflating: PennFudanPed/PNGImages/FudanPed00010.png inflating: PennFudanPed/PNGImages/FudanPed00011.png inflating: PennFudanPed/PNGImages/FudanPed00012.png inflating: PennFudanPed/PNGImages/FudanPed00013.png inflating: PennFudanPed/PNGImages/FudanPed00014.png inflating: PennFudanPed/PNGImages/FudanPed00015.png inflating: PennFudanPed/PNGImages/FudanPed00016.png inflating: PennFudanPed/PNGImages/FudanPed00017.png inflating: PennFudanPed/PNGImages/FudanPed00018.png inflating: PennFudanPed/PNGImages/FudanPed00019.png inflating: PennFudanPed/PNGImages/FudanPed00020.png inflating: PennFudanPed/PNGImages/FudanPed00021.png inflating: PennFudanPed/PNGImages/FudanPed00022.png inflating: PennFudanPed/PNGImages/FudanPed00023.png inflating: PennFudanPed/PNGImages/FudanPed00024.png inflating: PennFudanPed/PNGImages/FudanPed00025.png inflating: PennFudanPed/PNGImages/FudanPed00026.png inflating: PennFudanPed/PNGImages/FudanPed00027.png inflating: PennFudanPed/PNGImages/FudanPed00028.png inflating: PennFudanPed/PNGImages/FudanPed00029.png inflating: PennFudanPed/PNGImages/FudanPed00030.png inflating: PennFudanPed/PNGImages/FudanPed00031.png inflating: PennFudanPed/PNGImages/FudanPed00032.png inflating: PennFudanPed/PNGImages/FudanPed00033.png inflating: PennFudanPed/PNGImages/FudanPed00034.png inflating: PennFudanPed/PNGImages/FudanPed00035.png inflating: PennFudanPed/PNGImages/FudanPed00036.png inflating: PennFudanPed/PNGImages/FudanPed00037.png inflating: PennFudanPed/PNGImages/FudanPed00038.png inflating: PennFudanPed/PNGImages/FudanPed00039.png inflating: PennFudanPed/PNGImages/FudanPed00040.png inflating: PennFudanPed/PNGImages/FudanPed00041.png inflating: PennFudanPed/PNGImages/FudanPed00042.png inflating: PennFudanPed/PNGImages/FudanPed00043.png inflating: PennFudanPed/PNGImages/FudanPed00044.png inflating: PennFudanPed/PNGImages/FudanPed00045.png inflating: PennFudanPed/PNGImages/FudanPed00046.png inflating: PennFudanPed/PNGImages/FudanPed00047.png inflating: PennFudanPed/PNGImages/FudanPed00048.png inflating: PennFudanPed/PNGImages/FudanPed00049.png inflating: PennFudanPed/PNGImages/FudanPed00050.png inflating: PennFudanPed/PNGImages/FudanPed00051.png inflating: PennFudanPed/PNGImages/FudanPed00052.png inflating: PennFudanPed/PNGImages/FudanPed00053.png inflating: PennFudanPed/PNGImages/FudanPed00054.png inflating: PennFudanPed/PNGImages/FudanPed00055.png inflating: PennFudanPed/PNGImages/FudanPed00056.png inflating: PennFudanPed/PNGImages/FudanPed00057.png inflating: PennFudanPed/PNGImages/FudanPed00058.png inflating: PennFudanPed/PNGImages/FudanPed00059.png inflating: PennFudanPed/PNGImages/FudanPed00060.png inflating: PennFudanPed/PNGImages/FudanPed00061.png inflating: PennFudanPed/PNGImages/FudanPed00062.png inflating: PennFudanPed/PNGImages/FudanPed00063.png inflating: PennFudanPed/PNGImages/FudanPed00064.png inflating: PennFudanPed/PNGImages/FudanPed00065.png inflating: PennFudanPed/PNGImages/FudanPed00066.png inflating: PennFudanPed/PNGImages/FudanPed00067.png inflating: PennFudanPed/PNGImages/FudanPed00068.png inflating: PennFudanPed/PNGImages/FudanPed00069.png inflating: PennFudanPed/PNGImages/FudanPed00070.png inflating: PennFudanPed/PNGImages/FudanPed00071.png inflating: PennFudanPed/PNGImages/FudanPed00072.png inflating: PennFudanPed/PNGImages/FudanPed00073.png inflating: PennFudanPed/PNGImages/FudanPed00074.png inflating: PennFudanPed/PNGImages/PennPed00001.png inflating: PennFudanPed/PNGImages/PennPed00002.png inflating: PennFudanPed/PNGImages/PennPed00003.png inflating: PennFudanPed/PNGImages/PennPed00004.png inflating: PennFudanPed/PNGImages/PennPed00005.png inflating: PennFudanPed/PNGImages/PennPed00006.png inflating: PennFudanPed/PNGImages/PennPed00007.png inflating: PennFudanPed/PNGImages/PennPed00008.png inflating: PennFudanPed/PNGImages/PennPed00009.png inflating: PennFudanPed/PNGImages/PennPed00010.png inflating: PennFudanPed/PNGImages/PennPed00011.png inflating: PennFudanPed/PNGImages/PennPed00012.png inflating: PennFudanPed/PNGImages/PennPed00013.png inflating: PennFudanPed/PNGImages/PennPed00014.png inflating: PennFudanPed/PNGImages/PennPed00015.png inflating: PennFudanPed/PNGImages/PennPed00016.png inflating: PennFudanPed/PNGImages/PennPed00017.png inflating: PennFudanPed/PNGImages/PennPed00018.png inflating: PennFudanPed/PNGImages/PennPed00019.png inflating: PennFudanPed/PNGImages/PennPed00020.png inflating: PennFudanPed/PNGImages/PennPed00021.png inflating: PennFudanPed/PNGImages/PennPed00022.png inflating: PennFudanPed/PNGImages/PennPed00023.png inflating: PennFudanPed/PNGImages/PennPed00024.png inflating: PennFudanPed/PNGImages/PennPed00025.png inflating: PennFudanPed/PNGImages/PennPed00026.png inflating: PennFudanPed/PNGImages/PennPed00027.png inflating: PennFudanPed/PNGImages/PennPed00028.png inflating: PennFudanPed/PNGImages/PennPed00029.png inflating: PennFudanPed/PNGImages/PennPed00030.png inflating: PennFudanPed/PNGImages/PennPed00031.png inflating: PennFudanPed/PNGImages/PennPed00032.png inflating: PennFudanPed/PNGImages/PennPed00033.png inflating: PennFudanPed/PNGImages/PennPed00034.png inflating: PennFudanPed/PNGImages/PennPed00035.png inflating: PennFudanPed/PNGImages/PennPed00036.png inflating: PennFudanPed/PNGImages/PennPed00037.png inflating: PennFudanPed/PNGImages/PennPed00038.png inflating: PennFudanPed/PNGImages/PennPed00039.png inflating: PennFudanPed/PNGImages/PennPed00040.png inflating: PennFudanPed/PNGImages/PennPed00041.png inflating: PennFudanPed/PNGImages/PennPed00042.png inflating: PennFudanPed/PNGImages/PennPed00043.png inflating: PennFudanPed/PNGImages/PennPed00044.png inflating: PennFudanPed/PNGImages/PennPed00045.png inflating: PennFudanPed/PNGImages/PennPed00046.png inflating: PennFudanPed/PNGImages/PennPed00047.png inflating: PennFudanPed/PNGImages/PennPed00048.png inflating: PennFudanPed/PNGImages/PennPed00049.png inflating: PennFudanPed/PNGImages/PennPed00050.png inflating: PennFudanPed/PNGImages/PennPed00051.png inflating: PennFudanPed/PNGImages/PennPed00052.png inflating: PennFudanPed/PNGImages/PennPed00053.png inflating: PennFudanPed/PNGImages/PennPed00054.png inflating: PennFudanPed/PNGImages/PennPed00055.png inflating: PennFudanPed/PNGImages/PennPed00056.png inflating: PennFudanPed/PNGImages/PennPed00057.png inflating: PennFudanPed/PNGImages/PennPed00058.png inflating: PennFudanPed/PNGImages/PennPed00059.png inflating: PennFudanPed/PNGImages/PennPed00060.png inflating: PennFudanPed/PNGImages/PennPed00061.png inflating: PennFudanPed/PNGImages/PennPed00062.png inflating: PennFudanPed/PNGImages/PennPed00063.png inflating: PennFudanPed/PNGImages/PennPed00064.png inflating: PennFudanPed/PNGImages/PennPed00065.png inflating: PennFudanPed/PNGImages/PennPed00066.png inflating: PennFudanPed/PNGImages/PennPed00067.png inflating: PennFudanPed/PNGImages/PennPed00068.png inflating: PennFudanPed/PNGImages/PennPed00069.png inflating: PennFudanPed/PNGImages/PennPed00070.png inflating: PennFudanPed/PNGImages/PennPed00071.png inflating: PennFudanPed/PNGImages/PennPed00072.png inflating: PennFudanPed/PNGImages/PennPed00073.png inflating: PennFudanPed/PNGImages/PennPed00074.png inflating: PennFudanPed/PNGImages/PennPed00075.png inflating: PennFudanPed/PNGImages/PennPed00076.png inflating: PennFudanPed/PNGImages/PennPed00077.png inflating: PennFudanPed/PNGImages/PennPed00078.png inflating: PennFudanPed/PNGImages/PennPed00079.png inflating: PennFudanPed/PNGImages/PennPed00080.png inflating: PennFudanPed/PNGImages/PennPed00081.png inflating: PennFudanPed/PNGImages/PennPed00082.png inflating: PennFudanPed/PNGImages/PennPed00083.png inflating: PennFudanPed/PNGImages/PennPed00084.png inflating: PennFudanPed/PNGImages/PennPed00085.png inflating: PennFudanPed/PNGImages/PennPed00086.png inflating: PennFudanPed/PNGImages/PennPed00087.png inflating: PennFudanPed/PNGImages/PennPed00088.png inflating: PennFudanPed/PNGImages/PennPed00089.png inflating: PennFudanPed/PNGImages/PennPed00090.png inflating: PennFudanPed/PNGImages/PennPed00091.png inflating: PennFudanPed/PNGImages/PennPed00092.png inflating: PennFudanPed/PNGImages/PennPed00093.png inflating: PennFudanPed/PNGImages/PennPed00094.png inflating: PennFudanPed/PNGImages/PennPed00095.png inflating: PennFudanPed/PNGImages/PennPed00096.png inflating: PennFudanPed/readme.txt
Let's have a look at the dataset and how it is layed down.
The data is structured as follows
PennFudanPed/
PedMasks/
FudanPed00001_mask.png
FudanPed00002_mask.png
FudanPed00003_mask.png
FudanPed00004_mask.png
...
PNGImages/
FudanPed00001.png
FudanPed00002.png
FudanPed00003.png
FudanPed00004.png
Here is one example of an image in the dataset, with its corresponding instance segmentation mask
from PIL import Image
Image.open('PennFudanPed/PNGImages/FudanPed00001.png')
mask = Image.open('PennFudanPed/PedMasks/FudanPed00001_mask.png')
# each mask instance has a different color, from zero to N, where
# N is the number of instances. In order to make visualization easier,
# let's adda color palette to the mask.
mask.putpalette([
0, 0, 0, # black background
255, 0, 0, # index 1 is red
255, 255, 0, # index 2 is yellow
255, 153, 0, # index 3 is orange
])
mask
So each image has a corresponding segmentation mask, where each color correspond to a different instance. Let's write a torch.utils.data.Dataset class for this dataset.
import os
import numpy as np
import torch
import torch.utils.data
from PIL import Image
class PennFudanDataset(torch.utils.data.Dataset):
def __init__(self, root, transforms=None):
self.root = root
self.transforms = transforms
# load all image files, sorting them to
# ensure that they are aligned
self.imgs = list(sorted(os.listdir(os.path.join(root, "PNGImages"))))
self.masks = list(sorted(os.listdir(os.path.join(root, "PedMasks"))))
def __getitem__(self, idx):
# load images and masks
img_path = os.path.join(self.root, "PNGImages", self.imgs[idx])
mask_path = os.path.join(self.root, "PedMasks", self.masks[idx])
img = Image.open(img_path).convert("RGB")
# note that we haven't converted the mask to RGB,
# because each color corresponds to a different instance
# with 0 being background
mask = Image.open(mask_path)
mask = np.array(mask)
# instances are encoded as different colors
obj_ids = np.unique(mask)
# first id is the background, so remove it
obj_ids = obj_ids[1:]
# split the color-encoded mask into a set
# of binary masks
masks = mask == obj_ids[:, None, None]
# get bounding box coordinates for each mask
num_objs = len(obj_ids)
boxes = []
for i in range(num_objs):
pos = np.where(masks[i])
xmin = np.min(pos[1])
xmax = np.max(pos[1])
ymin = np.min(pos[0])
ymax = np.max(pos[0])
boxes.append([xmin, ymin, xmax, ymax])
boxes = torch.as_tensor(boxes, dtype=torch.float32)
# there is only one class
labels = torch.ones((num_objs,), dtype=torch.int64)
masks = torch.as_tensor(masks, dtype=torch.uint8)
image_id = torch.tensor([idx])
area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 2] - boxes[:, 0])
# suppose all instances are not crowd
iscrowd = torch.zeros((num_objs,), dtype=torch.int64)
target = {}
target["boxes"] = boxes
target["labels"] = labels
target["masks"] = masks
target["image_id"] = image_id
target["area"] = area
target["iscrowd"] = iscrowd
if self.transforms is not None:
img, target = self.transforms(img, target)
return img, target
def __len__(self):
return len(self.imgs)
That's all for the dataset. Let's see how the outputs are structured for this dataset
dataset = PennFudanDataset('PennFudanPed/')
dataset[0]
(<PIL.Image.Image image mode=RGB size=559x536 at 0x7F9EDDF1A400>,
{'area': tensor([35358., 36225.]), 'boxes': tensor([[159., 181., 301., 430.],
[419., 170., 534., 485.]]), 'image_id': tensor([0]), 'iscrowd': tensor([0, 0]), 'labels': tensor([1, 1]), 'masks': tensor([[[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]],
[[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
...,
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0],
[0, 0, 0, ..., 0, 0, 0]]], dtype=torch.uint8)})
So we can see that by default, the dataset returns a PIL.Image and a dictionary
containing several fields, including boxes, labels and masks.
Defining your model¶
In this tutorial, we will be using Mask R-CNN, which is based on top of Faster R-CNN. Faster R-CNN is a model that predicts both bounding boxes and class scores for potential objects in the image.
Mask R-CNN adds an extra branch into Faster R-CNN, which also predicts segmentation masks for each instance.
There are two common situations where one might want to modify one of the available models in torchvision modelzoo. The first is when we want to start from a pre-trained model, and just finetune the last layer. The other is when we want to replace the backbone of the model with a different one (for faster predictions, for example).
Let's go see how we would do one or another in the following sections.
1 - Finetuning from a pretrained model¶
Let's suppose that you want to start from a model pre-trained on COCO and want to finetune it for your particular classes. Here is a possible way of doing it:
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
# load a model pre-trained pre-trained on COCO
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True)
# replace the classifier with a new one, that has
# num_classes which is user-defined
num_classes = 2 # 1 class (person) + background
# get number of input features for the classifier
in_features = model.roi_heads.box_predictor.cls_score.in_features
# replace the pre-trained head with a new one
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
2 - Modifying the model to add a different backbone¶
Another common situation arises when the user wants to replace the backbone of a detection model with a different one. For example, the current default backbone (ResNet-50) might be too big for some applications, and smaller models might be necessary.
Here is how we would go into leveraging the functions provided by torchvision to modify a backbone.
import torchvision
from torchvision.models.detection import FasterRCNN
from torchvision.models.detection.rpn import AnchorGenerator
# load a pre-trained model for classification and return
# only the features
backbone = torchvision.models.mobilenet_v2(pretrained=True).features
# FasterRCNN needs to know the number of
# output channels in a backbone. For mobilenet_v2, it's 1280
# so we need to add it here
backbone.out_channels = 1280
# let's make the RPN generate 5 x 3 anchors per spatial
# location, with 5 different sizes and 3 different aspect
# ratios. We have a Tuple[Tuple[int]] because each feature
# map could potentially have different sizes and
# aspect ratios
anchor_generator = AnchorGenerator(sizes=((32, 64, 128, 256, 512),),
aspect_ratios=((0.5, 1.0, 2.0),))
# let's define what are the feature maps that we will
# use to perform the region of interest cropping, as well as
# the size of the crop after rescaling.
# if your backbone returns a Tensor, featmap_names is expected to
# be [0]. More generally, the backbone should return an
# OrderedDict[Tensor], and in featmap_names you can choose which
# feature maps to use.
roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=[0],
output_size=7,
sampling_ratio=2)
# put the pieces together inside a FasterRCNN model
model = FasterRCNN(backbone,
num_classes=2,
rpn_anchor_generator=anchor_generator,
box_roi_pool=roi_pooler)
An Instance segmentation model for PennFudan Dataset¶
In our case, we want to fine-tune from a pre-trained model, given that our dataset is very small. So we will be following approach number 1.
Here we want to also compute the instance segmentation masks, so we will be using Mask R-CNN:
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
from torchvision.models.detection.mask_rcnn import MaskRCNNPredictor
def get_instance_segmentation_model(num_classes):
# load an instance segmentation model pre-trained on COCO
model = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True)
# get the number of input features for the classifier
in_features = model.roi_heads.box_predictor.cls_score.in_features
# replace the pre-trained head with a new one
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
# now get the number of input features for the mask classifier
in_features_mask = model.roi_heads.mask_predictor.conv5_mask.in_channels
hidden_layer = 256
# and replace the mask predictor with a new one
model.roi_heads.mask_predictor = MaskRCNNPredictor(in_features_mask,
hidden_layer,
num_classes)
return model
That's it, this will make model be ready to be trained and evaluated on our custom dataset.
Training and evaluation functions¶
In references/detection/, we have a number of helper functions to simplify training and evaluating detection models.
Here, we will use references/detection/engine.py, references/detection/utils.py and references/detection/transforms.py.
Let's copy those files (and their dependencies) in here so that they are available in the notebook
%%shell
# Download TorchVision repo to use some files from
# references/detection
git clone https://github.com/pytorch/vision.git
cd vision
git checkout v0.3.0
cp references/detection/utils.py ../
cp references/detection/transforms.py ../
cp references/detection/coco_eval.py ../
cp references/detection/engine.py ../
cp references/detection/coco_utils.py ../
fatal: destination path 'vision' already exists and is not an empty directory. Already on 'v0.3.0' Your branch is up to date with 'origin/v0.3.0'.
Let's write some helper functions for data augmentation / transformation, which leverages the functions in refereces/detection that we have just copied:
from engine import train_one_epoch, evaluate
import utils
import transforms as T
def get_transform(train):
transforms = []
# converts the image, a PIL image, into a PyTorch Tensor
transforms.append(T.ToTensor())
if train:
# during training, randomly flip the training images
# and ground-truth for data augmentation
transforms.append(T.RandomHorizontalFlip(0.5))
return T.Compose(transforms)
Note that we do not need to add a mean/std normalization nor image rescaling in the data transforms, as those are handled internally by the Mask R-CNN model.¶
Putting everything together¶
We now have the dataset class, the models and the data transforms. Let's instantiate them
# use our dataset and defined transformations
dataset = PennFudanDataset('PennFudanPed', get_transform(train=True))
dataset_test = PennFudanDataset('PennFudanPed', get_transform(train=False))
# split the dataset in train and test set
torch.manual_seed(1)
indices = torch.randperm(len(dataset)).tolist()
dataset = torch.utils.data.Subset(dataset, indices[:-50])
dataset_test = torch.utils.data.Subset(dataset_test, indices[-50:])
# define training and validation data loaders
data_loader = torch.utils.data.DataLoader(
dataset, batch_size=2, shuffle=True, num_workers=4,
collate_fn=utils.collate_fn)
data_loader_test = torch.utils.data.DataLoader(
dataset_test, batch_size=1, shuffle=False, num_workers=4,
collate_fn=utils.collate_fn)
Now let's instantiate the model and the optimizer
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
# our dataset has two classes only - background and person
num_classes = 2
# get the model using our helper function
model = get_instance_segmentation_model(num_classes)
# move model to the right device
model.to(device)
# construct an optimizer
params = [p for p in model.parameters() if p.requires_grad]
optimizer = torch.optim.SGD(params, lr=0.005,
momentum=0.9, weight_decay=0.0005)
# and a learning rate scheduler which decreases the learning rate by
# 10x every 3 epochs
lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer,
step_size=3,
gamma=0.1)
Downloading: "https://download.pytorch.org/models/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth" to /root/.cache/torch/checkpoints/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth 100%|██████████| 178090079/178090079 [00:02<00:00, 61358754.67it/s]
And now let's train the model for 10 epochs, evaluating at the end of every epoch.
# let's train it for 10 epochs
num_epochs = 10
for epoch in range(num_epochs):
# train for one epoch, printing every 10 iterations
train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10)
# update the learning rate
lr_scheduler.step()
# evaluate on the test dataset
evaluate(model, data_loader_test, device=device)
Epoch: [0] [ 0/60] eta: 0:01:54 lr: 0.000090 loss: 3.5688 (3.5688) loss_classifier: 0.7563 (0.7563) loss_box_reg: 0.1544 (0.1544) loss_mask: 2.6350 (2.6350) loss_objectness: 0.0167 (0.0167) loss_rpn_box_reg: 0.0064 (0.0064) time: 1.9101 data: 0.4269 max mem: 3175 Epoch: [0] [10/60] eta: 0:00:35 lr: 0.000936 loss: 1.5702 (2.1186) loss_classifier: 0.4521 (0.4978) loss_box_reg: 0.1846 (0.1915) loss_mask: 0.9227 (1.3971) loss_objectness: 0.0173 (0.0219) loss_rpn_box_reg: 0.0087 (0.0103) time: 0.7126 data: 0.0450 max mem: 4552 Epoch: [0] [20/60] eta: 0:00:26 lr: 0.001783 loss: 0.8643 (1.4273) loss_classifier: 0.2400 (0.3407) loss_box_reg: 0.1589 (0.1740) loss_mask: 0.3977 (0.8806) loss_objectness: 0.0173 (0.0201) loss_rpn_box_reg: 0.0090 (0.0119) time: 0.5888 data: 0.0067 max mem: 4552 Epoch: [0] [30/60] eta: 0:00:19 lr: 0.002629 loss: 0.5349 (1.1192) loss_classifier: 0.0967 (0.2569) loss_box_reg: 0.1289 (0.1610) loss_mask: 0.2496 (0.6734) loss_objectness: 0.0102 (0.0163) loss_rpn_box_reg: 0.0101 (0.0116) time: 0.6026 data: 0.0066 max mem: 5310 Epoch: [0] [40/60] eta: 0:00:12 lr: 0.003476 loss: 0.4128 (0.9479) loss_classifier: 0.0634 (0.2091) loss_box_reg: 0.1078 (0.1524) loss_mask: 0.2095 (0.5601) loss_objectness: 0.0059 (0.0138) loss_rpn_box_reg: 0.0113 (0.0125) time: 0.6283 data: 0.0066 max mem: 5310 Epoch: [0] [50/60] eta: 0:00:06 lr: 0.004323 loss: 0.3223 (0.8260) loss_classifier: 0.0453 (0.1783) loss_box_reg: 0.0899 (0.1395) loss_mask: 0.1734 (0.4838) loss_objectness: 0.0038 (0.0118) loss_rpn_box_reg: 0.0113 (0.0126) time: 0.6311 data: 0.0070 max mem: 5310 Epoch: [0] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.2608 (0.7366) loss_classifier: 0.0390 (0.1564) loss_box_reg: 0.0574 (0.1245) loss_mask: 0.1512 (0.4334) loss_objectness: 0.0020 (0.0103) loss_rpn_box_reg: 0.0102 (0.0121) time: 0.6404 data: 0.0075 max mem: 5310 Epoch: [0] Total time: 0:00:38 (0.6413 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:28 model_time: 0.3890 (0.3890) evaluator_time: 0.0042 (0.0042) time: 0.5795 data: 0.1848 max mem: 5310 Test: [49/50] eta: 0:00:00 model_time: 0.1158 (0.1223) evaluator_time: 0.0046 (0.0088) time: 0.1289 data: 0.0036 max mem: 5310 Test: Total time: 0:00:07 (0.1421 s / it) Averaged stats: model_time: 0.1158 (0.1223) evaluator_time: 0.0046 (0.0088) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.682 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.982 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.872 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 ] = 0.406 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.311 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.742 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.742 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 ] = 0.700 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.745 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.704 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.982 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.910 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 ] = 0.434 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.717 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.323 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.748 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.750 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 ] = 0.688 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.754 Epoch: [1] [ 0/60] eta: 0:01:04 lr: 0.005000 loss: 0.3601 (0.3601) loss_classifier: 0.0550 (0.0550) loss_box_reg: 0.1111 (0.1111) loss_mask: 0.1692 (0.1692) loss_objectness: 0.0032 (0.0032) loss_rpn_box_reg: 0.0217 (0.0217) time: 1.0794 data: 0.4107 max mem: 5310 Epoch: [1] [10/60] eta: 0:00:37 lr: 0.005000 loss: 0.2678 (0.2754) loss_classifier: 0.0542 (0.0497) loss_box_reg: 0.0572 (0.0565) loss_mask: 0.1510 (0.1532) loss_objectness: 0.0016 (0.0019) loss_rpn_box_reg: 0.0096 (0.0142) time: 0.7499 data: 0.0436 max mem: 5310 Epoch: [1] [20/60] eta: 0:00:28 lr: 0.005000 loss: 0.2345 (0.2438) loss_classifier: 0.0400 (0.0421) loss_box_reg: 0.0362 (0.0445) loss_mask: 0.1347 (0.1429) loss_objectness: 0.0014 (0.0022) loss_rpn_box_reg: 0.0095 (0.0121) time: 0.6846 data: 0.0068 max mem: 5310 Epoch: [1] [30/60] eta: 0:00:20 lr: 0.005000 loss: 0.1942 (0.2286) loss_classifier: 0.0235 (0.0373) loss_box_reg: 0.0205 (0.0355) loss_mask: 0.1293 (0.1434) loss_objectness: 0.0005 (0.0017) loss_rpn_box_reg: 0.0068 (0.0106) time: 0.6301 data: 0.0066 max mem: 5310 Epoch: [1] [40/60] eta: 0:00:13 lr: 0.005000 loss: 0.1951 (0.2253) loss_classifier: 0.0277 (0.0361) loss_box_reg: 0.0173 (0.0324) loss_mask: 0.1331 (0.1450) loss_objectness: 0.0005 (0.0016) loss_rpn_box_reg: 0.0074 (0.0102) time: 0.6304 data: 0.0066 max mem: 5310 Epoch: [1] [50/60] eta: 0:00:06 lr: 0.005000 loss: 0.2011 (0.2242) loss_classifier: 0.0348 (0.0370) loss_box_reg: 0.0207 (0.0309) loss_mask: 0.1337 (0.1438) loss_objectness: 0.0007 (0.0016) loss_rpn_box_reg: 0.0080 (0.0109) time: 0.6441 data: 0.0068 max mem: 5310 Epoch: [1] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.2162 (0.2248) loss_classifier: 0.0381 (0.0382) loss_box_reg: 0.0253 (0.0307) loss_mask: 0.1325 (0.1437) loss_objectness: 0.0008 (0.0016) loss_rpn_box_reg: 0.0085 (0.0106) time: 0.6245 data: 0.0067 max mem: 5310 Epoch: [1] Total time: 0:00:39 (0.6548 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1625 (0.1625) evaluator_time: 0.0040 (0.0040) time: 0.3575 data: 0.1894 max mem: 5310 Test: [49/50] eta: 0:00:00 model_time: 0.1113 (0.1127) evaluator_time: 0.0037 (0.0072) time: 0.1226 data: 0.0034 max mem: 5310 Test: Total time: 0:00:06 (0.1306 s / it) Averaged stats: model_time: 0.1113 (0.1127) evaluator_time: 0.0037 (0.0072) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.750 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.983 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.959 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 ] = 0.440 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.353 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.803 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.803 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 ] = 0.725 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.809 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.734 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.974 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.889 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 ] = 0.413 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.749 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.339 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.776 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.776 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 ] = 0.662 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.784 Epoch: [2] [ 0/60] eta: 0:00:57 lr: 0.005000 loss: 0.2592 (0.2592) loss_classifier: 0.0457 (0.0457) loss_box_reg: 0.0357 (0.0357) loss_mask: 0.1604 (0.1604) loss_objectness: 0.0005 (0.0005) loss_rpn_box_reg: 0.0169 (0.0169) time: 0.9603 data: 0.4132 max mem: 5310 Epoch: [2] [10/60] eta: 0:00:31 lr: 0.005000 loss: 0.1793 (0.1962) loss_classifier: 0.0260 (0.0358) loss_box_reg: 0.0164 (0.0199) loss_mask: 0.1189 (0.1288) loss_objectness: 0.0010 (0.0015) loss_rpn_box_reg: 0.0086 (0.0102) time: 0.6373 data: 0.0410 max mem: 5310 Epoch: [2] [20/60] eta: 0:00:25 lr: 0.005000 loss: 0.2012 (0.2086) loss_classifier: 0.0270 (0.0358) loss_box_reg: 0.0164 (0.0226) loss_mask: 0.1226 (0.1372) loss_objectness: 0.0010 (0.0015) loss_rpn_box_reg: 0.0102 (0.0115) time: 0.6289 data: 0.0052 max mem: 5310 Epoch: [2] [30/60] eta: 0:00:18 lr: 0.005000 loss: 0.1754 (0.1926) loss_classifier: 0.0270 (0.0320) loss_box_reg: 0.0133 (0.0183) loss_mask: 0.1226 (0.1313) loss_objectness: 0.0005 (0.0011) loss_rpn_box_reg: 0.0082 (0.0099) time: 0.6294 data: 0.0067 max mem: 5310 Epoch: [2] [40/60] eta: 0:00:12 lr: 0.005000 loss: 0.1664 (0.1907) loss_classifier: 0.0313 (0.0322) loss_box_reg: 0.0121 (0.0178) loss_mask: 0.1240 (0.1294) loss_objectness: 0.0005 (0.0014) loss_rpn_box_reg: 0.0079 (0.0098) time: 0.6273 data: 0.0067 max mem: 5310 Epoch: [2] [50/60] eta: 0:00:06 lr: 0.005000 loss: 0.1771 (0.1862) loss_classifier: 0.0285 (0.0308) loss_box_reg: 0.0145 (0.0170) loss_mask: 0.1263 (0.1278) loss_objectness: 0.0005 (0.0013) loss_rpn_box_reg: 0.0086 (0.0094) time: 0.6417 data: 0.0068 max mem: 5310 Epoch: [2] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.1771 (0.1900) loss_classifier: 0.0257 (0.0316) loss_box_reg: 0.0158 (0.0180) loss_mask: 0.1269 (0.1291) loss_objectness: 0.0009 (0.0014) loss_rpn_box_reg: 0.0077 (0.0099) time: 0.6555 data: 0.0073 max mem: 5310 Epoch: [2] Total time: 0:00:38 (0.6433 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:18 model_time: 0.1615 (0.1615) evaluator_time: 0.0041 (0.0041) time: 0.3662 data: 0.1992 max mem: 5310 Test: [49/50] eta: 0:00:00 model_time: 0.1143 (0.1142) evaluator_time: 0.0035 (0.0059) time: 0.1230 data: 0.0034 max mem: 5310 Test: Total time: 0:00:06 (0.1307 s / it) Averaged stats: model_time: 0.1143 (0.1142) evaluator_time: 0.0035 (0.0059) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.803 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.958 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 ] = 0.474 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.814 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.363 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.840 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.840 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.846 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.764 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.922 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 ] = 0.474 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.776 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.345 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.803 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.803 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 ] = 0.725 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.809 Epoch: [3] [ 0/60] eta: 0:01:31 lr: 0.000500 loss: 0.2188 (0.2188) loss_classifier: 0.0488 (0.0488) loss_box_reg: 0.0222 (0.0222) loss_mask: 0.1369 (0.1369) loss_objectness: 0.0002 (0.0002) loss_rpn_box_reg: 0.0106 (0.0106) time: 1.5300 data: 0.7803 max mem: 5310 Epoch: [3] [10/60] eta: 0:00:35 lr: 0.000500 loss: 0.1462 (0.1512) loss_classifier: 0.0216 (0.0238) loss_box_reg: 0.0074 (0.0093) loss_mask: 0.1066 (0.1111) loss_objectness: 0.0005 (0.0006) loss_rpn_box_reg: 0.0048 (0.0064) time: 0.7073 data: 0.0738 max mem: 5310 Epoch: [3] [20/60] eta: 0:00:27 lr: 0.000500 loss: 0.1462 (0.1572) loss_classifier: 0.0216 (0.0257) loss_box_reg: 0.0068 (0.0108) loss_mask: 0.1055 (0.1123) loss_objectness: 0.0004 (0.0007) loss_rpn_box_reg: 0.0052 (0.0077) time: 0.6362 data: 0.0049 max mem: 5310 Epoch: [3] [30/60] eta: 0:00:20 lr: 0.000500 loss: 0.1587 (0.1656) loss_classifier: 0.0256 (0.0275) loss_box_reg: 0.0095 (0.0120) loss_mask: 0.1156 (0.1169) loss_objectness: 0.0005 (0.0009) loss_rpn_box_reg: 0.0082 (0.0083) time: 0.6555 data: 0.0066 max mem: 5310 Epoch: [3] [40/60] eta: 0:00:13 lr: 0.000500 loss: 0.1624 (0.1694) loss_classifier: 0.0229 (0.0269) loss_box_reg: 0.0107 (0.0128) loss_mask: 0.1235 (0.1206) loss_objectness: 0.0007 (0.0010) loss_rpn_box_reg: 0.0076 (0.0082) time: 0.6545 data: 0.0068 max mem: 5310 Epoch: [3] [50/60] eta: 0:00:06 lr: 0.000500 loss: 0.1547 (0.1647) loss_classifier: 0.0229 (0.0262) loss_box_reg: 0.0094 (0.0123) loss_mask: 0.1069 (0.1176) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0057 (0.0077) time: 0.6276 data: 0.0068 max mem: 5310 Epoch: [3] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1461 (0.1655) loss_classifier: 0.0218 (0.0258) loss_box_reg: 0.0084 (0.0123) loss_mask: 0.1061 (0.1185) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0056 (0.0079) time: 0.6126 data: 0.0068 max mem: 5310 Epoch: [3] Total time: 0:00:39 (0.6519 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:18 model_time: 0.1630 (0.1630) evaluator_time: 0.0038 (0.0038) time: 0.3705 data: 0.2021 max mem: 5310 Test: [49/50] eta: 0:00:00 model_time: 0.1125 (0.1124) evaluator_time: 0.0037 (0.0057) time: 0.1215 data: 0.0036 max mem: 5310 Test: Total time: 0:00:06 (0.1294 s / it) Averaged stats: model_time: 0.1125 (0.1124) evaluator_time: 0.0037 (0.0057) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.814 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.991 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.953 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 ] = 0.543 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.823 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.371 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.855 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.855 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.860 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.760 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.991 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.918 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 ] = 0.478 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.768 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.345 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.801 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.801 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 ] = 0.750 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.805 Epoch: [4] [ 0/60] eta: 0:01:06 lr: 0.000500 loss: 0.1322 (0.1322) loss_classifier: 0.0270 (0.0270) loss_box_reg: 0.0052 (0.0052) loss_mask: 0.0926 (0.0926) loss_objectness: 0.0006 (0.0006) loss_rpn_box_reg: 0.0069 (0.0069) time: 1.1061 data: 0.5225 max mem: 5310 Epoch: [4] [10/60] eta: 0:00:32 lr: 0.000500 loss: 0.1779 (0.1740) loss_classifier: 0.0281 (0.0279) loss_box_reg: 0.0109 (0.0119) loss_mask: 0.1205 (0.1249) loss_objectness: 0.0003 (0.0020) loss_rpn_box_reg: 0.0063 (0.0073) time: 0.6471 data: 0.0514 max mem: 5310 Epoch: [4] [20/60] eta: 0:00:25 lr: 0.000500 loss: 0.1608 (0.1713) loss_classifier: 0.0286 (0.0280) loss_box_reg: 0.0116 (0.0126) loss_mask: 0.1129 (0.1215) loss_objectness: 0.0003 (0.0015) loss_rpn_box_reg: 0.0059 (0.0077) time: 0.6207 data: 0.0055 max mem: 5345 Epoch: [4] [30/60] eta: 0:00:19 lr: 0.000500 loss: 0.1483 (0.1668) loss_classifier: 0.0242 (0.0268) loss_box_reg: 0.0076 (0.0124) loss_mask: 0.1040 (0.1189) loss_objectness: 0.0004 (0.0012) loss_rpn_box_reg: 0.0059 (0.0075) time: 0.6336 data: 0.0070 max mem: 5345 Epoch: [4] [40/60] eta: 0:00:12 lr: 0.000500 loss: 0.1355 (0.1625) loss_classifier: 0.0154 (0.0258) loss_box_reg: 0.0067 (0.0115) loss_mask: 0.1040 (0.1165) loss_objectness: 0.0003 (0.0011) loss_rpn_box_reg: 0.0070 (0.0075) time: 0.6434 data: 0.0075 max mem: 5345 Epoch: [4] [50/60] eta: 0:00:06 lr: 0.000500 loss: 0.1472 (0.1608) loss_classifier: 0.0202 (0.0249) loss_box_reg: 0.0074 (0.0112) loss_mask: 0.1040 (0.1161) loss_objectness: 0.0003 (0.0011) loss_rpn_box_reg: 0.0060 (0.0076) time: 0.6428 data: 0.0071 max mem: 5345 Epoch: [4] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1477 (0.1613) loss_classifier: 0.0225 (0.0251) loss_box_reg: 0.0092 (0.0113) loss_mask: 0.1126 (0.1163) loss_objectness: 0.0003 (0.0010) loss_rpn_box_reg: 0.0065 (0.0076) time: 0.6340 data: 0.0069 max mem: 5345 Epoch: [4] Total time: 0:00:38 (0.6423 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1500 (0.1500) evaluator_time: 0.0040 (0.0040) time: 0.3557 data: 0.2002 max mem: 5345 Test: [49/50] eta: 0:00:00 model_time: 0.1121 (0.1121) evaluator_time: 0.0034 (0.0057) time: 0.1219 data: 0.0034 max mem: 5345 Test: Total time: 0:00:06 (0.1286 s / it) Averaged stats: model_time: 0.1121 (0.1121) evaluator_time: 0.0034 (0.0057) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.820 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.991 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.953 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 ] = 0.537 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.831 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.376 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.860 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.860 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 ] = 0.775 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.866 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.769 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.991 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.910 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 ] = 0.447 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.779 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.347 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.806 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.806 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 ] = 0.738 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.811 Epoch: [5] [ 0/60] eta: 0:00:52 lr: 0.000500 loss: 0.1502 (0.1502) loss_classifier: 0.0202 (0.0202) loss_box_reg: 0.0114 (0.0114) loss_mask: 0.1132 (0.1132) loss_objectness: 0.0002 (0.0002) loss_rpn_box_reg: 0.0052 (0.0052) time: 0.8670 data: 0.2655 max mem: 5345 Epoch: [5] [10/60] eta: 0:00:32 lr: 0.000500 loss: 0.1636 (0.1717) loss_classifier: 0.0243 (0.0294) loss_box_reg: 0.0138 (0.0136) loss_mask: 0.1141 (0.1192) loss_objectness: 0.0003 (0.0006) loss_rpn_box_reg: 0.0084 (0.0090) time: 0.6526 data: 0.0301 max mem: 5345 Epoch: [5] [20/60] eta: 0:00:25 lr: 0.000500 loss: 0.1494 (0.1601) loss_classifier: 0.0224 (0.0261) loss_box_reg: 0.0092 (0.0117) loss_mask: 0.1076 (0.1138) loss_objectness: 0.0003 (0.0005) loss_rpn_box_reg: 0.0083 (0.0080) time: 0.6330 data: 0.0066 max mem: 5345 Epoch: [5] [30/60] eta: 0:00:18 lr: 0.000500 loss: 0.1496 (0.1594) loss_classifier: 0.0195 (0.0251) loss_box_reg: 0.0092 (0.0113) loss_mask: 0.1076 (0.1146) loss_objectness: 0.0002 (0.0005) loss_rpn_box_reg: 0.0075 (0.0079) time: 0.6204 data: 0.0066 max mem: 5345 Epoch: [5] [40/60] eta: 0:00:12 lr: 0.000500 loss: 0.1606 (0.1639) loss_classifier: 0.0249 (0.0260) loss_box_reg: 0.0108 (0.0124) loss_mask: 0.1124 (0.1169) loss_objectness: 0.0003 (0.0005) loss_rpn_box_reg: 0.0072 (0.0081) time: 0.6338 data: 0.0067 max mem: 5345 Epoch: [5] [50/60] eta: 0:00:06 lr: 0.000500 loss: 0.1578 (0.1641) loss_classifier: 0.0230 (0.0257) loss_box_reg: 0.0093 (0.0117) loss_mask: 0.1112 (0.1180) loss_objectness: 0.0004 (0.0006) loss_rpn_box_reg: 0.0055 (0.0080) time: 0.6592 data: 0.0070 max mem: 5345 Epoch: [5] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1517 (0.1626) loss_classifier: 0.0220 (0.0252) loss_box_reg: 0.0081 (0.0111) loss_mask: 0.1121 (0.1179) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0053 (0.0078) time: 0.6494 data: 0.0070 max mem: 5345 Epoch: [5] Total time: 0:00:38 (0.6447 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1581 (0.1581) evaluator_time: 0.0041 (0.0041) time: 0.3526 data: 0.1888 max mem: 5345 Test: [49/50] eta: 0:00:00 model_time: 0.1133 (0.1119) evaluator_time: 0.0036 (0.0058) time: 0.1216 data: 0.0035 max mem: 5345 Test: Total time: 0:00:06 (0.1288 s / it) Averaged stats: model_time: 0.1133 (0.1119) evaluator_time: 0.0036 (0.0058) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.818 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.959 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 ] = 0.531 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.828 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.374 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.858 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.858 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.863 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.764 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.916 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 ] = 0.484 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.772 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.350 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.806 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.806 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.809 Epoch: [6] [ 0/60] eta: 0:01:15 lr: 0.000050 loss: 0.1268 (0.1268) loss_classifier: 0.0136 (0.0136) loss_box_reg: 0.0076 (0.0076) loss_mask: 0.0992 (0.0992) loss_objectness: 0.0001 (0.0001) loss_rpn_box_reg: 0.0063 (0.0063) time: 1.2659 data: 0.4840 max mem: 5345 Epoch: [6] [10/60] eta: 0:00:34 lr: 0.000050 loss: 0.1542 (0.1612) loss_classifier: 0.0221 (0.0240) loss_box_reg: 0.0120 (0.0117) loss_mask: 0.1061 (0.1164) loss_objectness: 0.0002 (0.0004) loss_rpn_box_reg: 0.0063 (0.0087) time: 0.6829 data: 0.0505 max mem: 5345 Epoch: [6] [20/60] eta: 0:00:25 lr: 0.000050 loss: 0.1531 (0.1596) loss_classifier: 0.0212 (0.0233) loss_box_reg: 0.0076 (0.0108) loss_mask: 0.1123 (0.1169) loss_objectness: 0.0003 (0.0006) loss_rpn_box_reg: 0.0059 (0.0080) time: 0.6122 data: 0.0072 max mem: 5345 Epoch: [6] [30/60] eta: 0:00:18 lr: 0.000050 loss: 0.1465 (0.1650) loss_classifier: 0.0202 (0.0256) loss_box_reg: 0.0058 (0.0120) loss_mask: 0.1123 (0.1186) loss_objectness: 0.0004 (0.0009) loss_rpn_box_reg: 0.0055 (0.0078) time: 0.5959 data: 0.0069 max mem: 5345 Epoch: [6] [40/60] eta: 0:00:12 lr: 0.000050 loss: 0.1378 (0.1603) loss_classifier: 0.0256 (0.0268) loss_box_reg: 0.0068 (0.0109) loss_mask: 0.0993 (0.1142) loss_objectness: 0.0005 (0.0009) loss_rpn_box_reg: 0.0052 (0.0074) time: 0.6272 data: 0.0066 max mem: 5345 Epoch: [6] [50/60] eta: 0:00:06 lr: 0.000050 loss: 0.1372 (0.1623) loss_classifier: 0.0256 (0.0264) loss_box_reg: 0.0075 (0.0115) loss_mask: 0.1033 (0.1161) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0058 (0.0075) time: 0.6603 data: 0.0066 max mem: 5345 Epoch: [6] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1372 (0.1619) loss_classifier: 0.0204 (0.0260) loss_box_reg: 0.0082 (0.0116) loss_mask: 0.1074 (0.1159) loss_objectness: 0.0004 (0.0008) loss_rpn_box_reg: 0.0070 (0.0075) time: 0.6463 data: 0.0067 max mem: 5345 Epoch: [6] Total time: 0:00:38 (0.6395 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1552 (0.1552) evaluator_time: 0.0040 (0.0040) time: 0.3581 data: 0.1974 max mem: 5345 Test: [49/50] eta: 0:00:00 model_time: 0.1129 (0.1116) evaluator_time: 0.0035 (0.0057) time: 0.1212 data: 0.0034 max mem: 5345 Test: Total time: 0:00:06 (0.1282 s / it) Averaged stats: model_time: 0.1129 (0.1116) evaluator_time: 0.0035 (0.0057) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.820 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.960 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 ] = 0.596 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.831 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.378 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.861 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.861 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.867 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.767 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.916 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 ] = 0.462 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.776 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.349 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.809 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.809 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.813 Epoch: [7] [ 0/60] eta: 0:00:53 lr: 0.000050 loss: 0.1048 (0.1048) loss_classifier: 0.0119 (0.0119) loss_box_reg: 0.0030 (0.0030) loss_mask: 0.0879 (0.0879) loss_objectness: 0.0000 (0.0000) loss_rpn_box_reg: 0.0020 (0.0020) time: 0.8976 data: 0.3350 max mem: 5345 Epoch: [7] [10/60] eta: 0:00:31 lr: 0.000050 loss: 0.1401 (0.1356) loss_classifier: 0.0189 (0.0191) loss_box_reg: 0.0068 (0.0071) loss_mask: 0.1048 (0.1042) loss_objectness: 0.0002 (0.0003) loss_rpn_box_reg: 0.0039 (0.0049) time: 0.6264 data: 0.0366 max mem: 5345 Epoch: [7] [20/60] eta: 0:00:25 lr: 0.000050 loss: 0.1401 (0.1490) loss_classifier: 0.0189 (0.0204) loss_box_reg: 0.0068 (0.0087) loss_mask: 0.1070 (0.1134) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0044 (0.0057) time: 0.6145 data: 0.0077 max mem: 5345 Epoch: [7] [30/60] eta: 0:00:19 lr: 0.000050 loss: 0.1424 (0.1498) loss_classifier: 0.0211 (0.0213) loss_box_reg: 0.0081 (0.0087) loss_mask: 0.1076 (0.1126) loss_objectness: 0.0005 (0.0008) loss_rpn_box_reg: 0.0058 (0.0065) time: 0.6514 data: 0.0081 max mem: 5370 Epoch: [7] [40/60] eta: 0:00:12 lr: 0.000050 loss: 0.1435 (0.1523) loss_classifier: 0.0230 (0.0232) loss_box_reg: 0.0090 (0.0091) loss_mask: 0.1069 (0.1127) loss_objectness: 0.0004 (0.0007) loss_rpn_box_reg: 0.0057 (0.0065) time: 0.6590 data: 0.0071 max mem: 5370 Epoch: [7] [50/60] eta: 0:00:06 lr: 0.000050 loss: 0.1519 (0.1545) loss_classifier: 0.0251 (0.0239) loss_box_reg: 0.0092 (0.0099) loss_mask: 0.1141 (0.1131) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0056 (0.0069) time: 0.6489 data: 0.0068 max mem: 5370 Epoch: [7] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1533 (0.1590) loss_classifier: 0.0280 (0.0257) loss_box_reg: 0.0101 (0.0109) loss_mask: 0.1141 (0.1143) loss_objectness: 0.0003 (0.0008) loss_rpn_box_reg: 0.0084 (0.0073) time: 0.6595 data: 0.0072 max mem: 5370 Epoch: [7] Total time: 0:00:38 (0.6479 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:18 model_time: 0.1607 (0.1607) evaluator_time: 0.0041 (0.0041) time: 0.3618 data: 0.1955 max mem: 5370 Test: [49/50] eta: 0:00:00 model_time: 0.1134 (0.1118) evaluator_time: 0.0037 (0.0058) time: 0.1218 data: 0.0036 max mem: 5370 Test: Total time: 0:00:06 (0.1283 s / it) Averaged stats: model_time: 0.1134 (0.1118) evaluator_time: 0.0037 (0.0058) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.821 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.960 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 ] = 0.596 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.832 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.380 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.862 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.862 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.868 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.768 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.917 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 ] = 0.464 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.776 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.350 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.809 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.809 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.813 Epoch: [8] [ 0/60] eta: 0:00:56 lr: 0.000050 loss: 0.1368 (0.1368) loss_classifier: 0.0151 (0.0151) loss_box_reg: 0.0078 (0.0078) loss_mask: 0.1098 (0.1098) loss_objectness: 0.0004 (0.0004) loss_rpn_box_reg: 0.0038 (0.0038) time: 0.9355 data: 0.2996 max mem: 5370 Epoch: [8] [10/60] eta: 0:00:31 lr: 0.000050 loss: 0.1555 (0.1604) loss_classifier: 0.0233 (0.0258) loss_box_reg: 0.0086 (0.0107) loss_mask: 0.1098 (0.1175) loss_objectness: 0.0002 (0.0003) loss_rpn_box_reg: 0.0047 (0.0061) time: 0.6251 data: 0.0334 max mem: 5370 Epoch: [8] [20/60] eta: 0:00:25 lr: 0.000050 loss: 0.1418 (0.1505) loss_classifier: 0.0192 (0.0216) loss_box_reg: 0.0067 (0.0087) loss_mask: 0.1037 (0.1131) loss_objectness: 0.0002 (0.0004) loss_rpn_box_reg: 0.0054 (0.0068) time: 0.6100 data: 0.0068 max mem: 5370 Epoch: [8] [30/60] eta: 0:00:19 lr: 0.000050 loss: 0.1427 (0.1506) loss_classifier: 0.0195 (0.0224) loss_box_reg: 0.0062 (0.0088) loss_mask: 0.1037 (0.1120) loss_objectness: 0.0003 (0.0004) loss_rpn_box_reg: 0.0065 (0.0070) time: 0.6461 data: 0.0068 max mem: 5370 Epoch: [8] [40/60] eta: 0:00:12 lr: 0.000050 loss: 0.1516 (0.1536) loss_classifier: 0.0240 (0.0236) loss_box_reg: 0.0096 (0.0103) loss_mask: 0.1037 (0.1117) loss_objectness: 0.0003 (0.0006) loss_rpn_box_reg: 0.0072 (0.0074) time: 0.6651 data: 0.0068 max mem: 5370 Epoch: [8] [50/60] eta: 0:00:06 lr: 0.000050 loss: 0.1570 (0.1595) loss_classifier: 0.0253 (0.0244) loss_box_reg: 0.0110 (0.0114) loss_mask: 0.1060 (0.1156) loss_objectness: 0.0003 (0.0006) loss_rpn_box_reg: 0.0074 (0.0074) time: 0.6429 data: 0.0067 max mem: 5370 Epoch: [8] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1545 (0.1596) loss_classifier: 0.0253 (0.0247) loss_box_reg: 0.0092 (0.0111) loss_mask: 0.1118 (0.1157) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0074 (0.0074) time: 0.6498 data: 0.0066 max mem: 5370 Epoch: [8] Total time: 0:00:38 (0.6474 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1581 (0.1581) evaluator_time: 0.0041 (0.0041) time: 0.3566 data: 0.1928 max mem: 5370 Test: [49/50] eta: 0:00:00 model_time: 0.1125 (0.1125) evaluator_time: 0.0036 (0.0058) time: 0.1217 data: 0.0036 max mem: 5370 Test: Total time: 0:00:06 (0.1290 s / it) Averaged stats: model_time: 0.1125 (0.1125) evaluator_time: 0.0036 (0.0058) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.826 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.960 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 ] = 0.596 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.837 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.382 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.865 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.865 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.870 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.772 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.917 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 ] = 0.458 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.782 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.352 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.812 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.812 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.815 Epoch: [9] [ 0/60] eta: 0:00:52 lr: 0.000005 loss: 0.1495 (0.1495) loss_classifier: 0.0158 (0.0158) loss_box_reg: 0.0093 (0.0093) loss_mask: 0.1086 (0.1086) loss_objectness: 0.0054 (0.0054) loss_rpn_box_reg: 0.0105 (0.0105) time: 0.8829 data: 0.2796 max mem: 5370 Epoch: [9] [10/60] eta: 0:00:32 lr: 0.000005 loss: 0.1645 (0.1607) loss_classifier: 0.0271 (0.0248) loss_box_reg: 0.0093 (0.0111) loss_mask: 0.1086 (0.1156) loss_objectness: 0.0007 (0.0020) loss_rpn_box_reg: 0.0077 (0.0072) time: 0.6560 data: 0.0323 max mem: 5370 Epoch: [9] [20/60] eta: 0:00:25 lr: 0.000005 loss: 0.1444 (0.1535) loss_classifier: 0.0218 (0.0224) loss_box_reg: 0.0078 (0.0095) loss_mask: 0.1078 (0.1142) loss_objectness: 0.0004 (0.0013) loss_rpn_box_reg: 0.0036 (0.0060) time: 0.6136 data: 0.0072 max mem: 5370 Epoch: [9] [30/60] eta: 0:00:18 lr: 0.000005 loss: 0.1361 (0.1559) loss_classifier: 0.0218 (0.0234) loss_box_reg: 0.0078 (0.0101) loss_mask: 0.1026 (0.1149) loss_objectness: 0.0004 (0.0010) loss_rpn_box_reg: 0.0052 (0.0065) time: 0.6150 data: 0.0069 max mem: 5370 Epoch: [9] [40/60] eta: 0:00:12 lr: 0.000005 loss: 0.1613 (0.1622) loss_classifier: 0.0243 (0.0252) loss_box_reg: 0.0092 (0.0118) loss_mask: 0.1054 (0.1169) loss_objectness: 0.0003 (0.0010) loss_rpn_box_reg: 0.0072 (0.0075) time: 0.6652 data: 0.0075 max mem: 5370 Epoch: [9] [50/60] eta: 0:00:06 lr: 0.000005 loss: 0.1473 (0.1602) loss_classifier: 0.0232 (0.0251) loss_box_reg: 0.0084 (0.0116) loss_mask: 0.1102 (0.1151) loss_objectness: 0.0004 (0.0009) loss_rpn_box_reg: 0.0070 (0.0075) time: 0.6760 data: 0.0074 max mem: 5370 Epoch: [9] [59/60] eta: 0:00:00 lr: 0.000005 loss: 0.1391 (0.1572) loss_classifier: 0.0203 (0.0244) loss_box_reg: 0.0067 (0.0109) loss_mask: 0.1049 (0.1136) loss_objectness: 0.0004 (0.0010) loss_rpn_box_reg: 0.0066 (0.0072) time: 0.6440 data: 0.0068 max mem: 5370 Epoch: [9] Total time: 0:00:38 (0.6447 s / it) creating index... index created! Test: [ 0/50] eta: 0:00:17 model_time: 0.1590 (0.1590) evaluator_time: 0.0039 (0.0039) time: 0.3443 data: 0.1797 max mem: 5370 Test: [49/50] eta: 0:00:00 model_time: 0.1123 (0.1119) evaluator_time: 0.0035 (0.0057) time: 0.1212 data: 0.0034 max mem: 5370 Test: Total time: 0:00:06 (0.1280 s / it) Averaged stats: model_time: 0.1123 (0.1119) evaluator_time: 0.0035 (0.0057) Accumulating evaluation results... DONE (t=0.01s). Accumulating evaluation results... DONE (t=0.01s). IoU metric: bbox Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.828 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.960 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 ] = 0.596 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.839 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.382 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.867 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.867 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 ] = 0.787 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.873 IoU metric: segm Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.771 Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990 Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.917 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 ] = 0.458 Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.780 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.351 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.811 Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.811 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 ] = 0.762 Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.814
Now that training has finished, let's have a look at what it actually predicts in a test image
# pick one image from the test set
img, _ = dataset_test[0]
# put the model in evaluation mode
model.eval()
with torch.no_grad():
prediction = model([img.to(device)])
Printing the prediction shows that we have a list of dictionaries. Each element of the list corresponds to a different image. As we have a single image, there is a single dictionary in the list.
The dictionary contains the predictions for the image we passed. In this case, we can see that it contains boxes, labels, masks and scores as fields.
prediction
[{'boxes': tensor([[ 61.6491, 35.3001, 197.0657, 327.6245],
[276.3604, 21.6470, 291.0668, 73.5886],
[ 78.8921, 43.7346, 201.9858, 207.4100]], device='cuda:0'),
'labels': tensor([1, 1, 1], device='cuda:0'),
'masks': tensor([[[[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.]]],
[[[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.]]],
[[[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.]]]], device='cuda:0'),
'scores': tensor([0.9995, 0.8236, 0.0713], device='cuda:0')}]
Let's inspect the image and the predicted segmentation masks.
For that, we need to convert the image, which has been rescaled to 0-1 and had the channels flipped so that we have it in [C, H, W] format.
Image.fromarray(img.mul(255).permute(1, 2, 0).byte().numpy())
And let's now visualize the top predicted segmentation mask. The masks are predicted as [N, 1, H, W], where N is the number of predictions, and are probability maps between 0-1.
Image.fromarray(prediction[0]['masks'][0, 0].mul(255).byte().cpu().numpy())
Looks pretty good!
Wrapping up¶
In this tutorial, you have learned how to create your own training pipeline for instance segmentation models, on a custom dataset.
For that, you wrote a torch.utils.data.Dataset class that returns the images and the ground truth boxes and segmentation masks. You also leveraged a Mask R-CNN model pre-trained on COCO train2017 in order to perform transfer learning on this new dataset.
For a more complete example, which includes multi-machine / multi-gpu training, check references/detection/train.py, which is present in the torchvision GitHub repo.