import torch
torch.cuda.is_available()
True
!pip install cython
!pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
Requirement already satisfied: cython in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (0.29.19)
Collecting git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
Cloning https://github.com/cocodataset/cocoapi.git to /tmp/pip-req-build-al3q5nlj
Running command git clone -q https://github.com/cocodataset/cocoapi.git /tmp/pip-req-build-al3q5nlj
Requirement already satisfied, skipping upgrade: setuptools>=18.0 in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (from pycocotools==2.0) (46.4.0.post20200518)
Requirement already satisfied, skipping upgrade: cython>=0.27.3 in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (from pycocotools==2.0) (0.29.19)
Collecting matplotlib>=2.1.0
Downloading matplotlib-3.2.1-cp36-cp36m-manylinux1_x86_64.whl (12.4 MB)
[K |████████████████████████████████| 12.4 MB 7.0 MB/s eta 0:00:01
[?25hCollecting kiwisolver>=1.0.1
Downloading kiwisolver-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (88 kB)
[K |████████████████████████████████| 88 kB 837 kB/s eta 0:00:01
[?25hCollecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
[K |████████████████████████████████| 67 kB 867 kB/s s eta 0:00:01
[?25hRequirement already satisfied, skipping upgrade: python-dateutil>=2.1 in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (from matplotlib>=2.1.0->pycocotools==2.0) (2.8.1)
Collecting cycler>=0.10
Downloading cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Requirement already satisfied, skipping upgrade: numpy>=1.11 in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (from matplotlib>=2.1.0->pycocotools==2.0) (1.18.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in /home/qy/.conda/envs/pytorch/lib/python3.6/site-packages (from python-dateutil>=2.1->matplotlib>=2.1.0->pycocotools==2.0) (1.14.0)
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... [?25ldone
[?25h Created wheel for pycocotools: filename=pycocotools-2.0-cp36-cp36m-linux_x86_64.whl size=282788 sha256=5e2c6293ef8c17974cee3aeccb1cce1b9c57e5890a4670db02b4e46cbe90bef6
Stored in directory: /tmp/pip-ephem-wheel-cache-p2ts_ztv/wheels/25/c1/63/8bee2969883497d2785c9bdbe4e89cae5efc59521553d528bf
Successfully built pycocotools
Installing collected packages: kiwisolver, pyparsing, cycler, matplotlib, pycocotools
Successfully installed cycler-0.10.0 kiwisolver-1.2.0 matplotlib-3.2.1 pycocotools-2.0 pyparsing-2.4.7
from PIL import Image
Image.open('PennFudanPed/PNGImages/FudanPed00001.png')

mask = Image.open('PennFudanPed/PedMasks/FudanPed00001_mask.png')
mask.putpalette([
0, 0, 0,
255, 0, 0,
255, 255, 0,
255, 153, 0,
])
mask

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
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):
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")
mask = Image.open(mask_path)
mask = np.array(mask)
obj_ids = np.unique(mask)
obj_ids = obj_ids[1:]
masks = mask == obj_ids[:, None, None]
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)
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])
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)
dataset = PennFudanDataset('PennFudanPed/')
dataset[0]
(,
{'boxes': tensor([[159., 181., 301., 430.],
[419., 170., 534., 485.]]),
'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),
'image_id': tensor([0]),
'area': tensor([35358., 36225.]),
'iscrowd': tensor([0, 0])})
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):
model = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True)
in_features = model.roi_heads.box_predictor.cls_score.in_features
model.roi_heads.box_predictor = FastRCNNPredictor(in_features, num_classes)
in_features_mask = model.roi_heads.mask_predictor.conv5_mask.in_channels
hidden_layer = 256
model.roi_heads.mask_predictor = MaskRCNNPredictor(in_features_mask,
hidden_layer,
num_classes)
return model
from engine import train_one_epoch, evaluate
import utils
import transforms as T
def get_transform(train):
transforms = []
transforms.append(T.ToTensor())
if train:
transforms.append(T.RandomHorizontalFlip(0.5))
return T.Compose(transforms)
dataset = PennFudanDataset('PennFudanPed', get_transform(train=True))
dataset_test = PennFudanDataset('PennFudanPed', get_transform(train=False))
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:])
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)
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
num_classes = 2
model = get_instance_segmentation_model(num_classes)
model.to(device)
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)
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 /home/qy/.cache/torch/checkpoints/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth
75.3%IOPub message rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_msg_rate_limit`.
Current values:
NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)
NotebookApp.rate_limit_window=3.0 (secs)
97.2%IOPub message rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
To change this limit, set the config variable
`--NotebookApp.iopub_msg_rate_limit`.
Current values:
NotebookApp.iopub_msg_rate_limit=1000.0 (msgs/sec)
NotebookApp.rate_limit_window=3.0 (secs)
num_epochs = 10
for epoch in range(num_epochs):
train_one_epoch(model, optimizer, data_loader, device, epoch, print_freq=10)
lr_scheduler.step()
evaluate(model, data_loader_test, device=device)
/home/qy/.conda/envs/pytorch/lib/python3.6/site-packages/torch/nn/functional.py:2854: UserWarning: The default behavior for interpolate/upsample with float scale_factor will change in 1.6.0 to align with other frameworks/libraries, and use scale_factor directly, instead of relying on the computed output size. If you wish to keep the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn("The default behavior for interpolate/upsample with float scale_factor will change "
/opt/conda/conda-bld/pytorch_1587428091666/work/torch/csrc/utils/python_arg_parser.cpp:756: UserWarning: This overload of nonzero is deprecated:
nonzero(Tensor input, *, Tensor out)
Consider using one of the following signatures instead:
nonzero(Tensor input, *, bool as_tuple)
Epoch: [0] [ 0/60] eta: 0:02:38 lr: 0.000090 loss: 3.5733 (3.5733) loss_classifier: 0.7385 (0.7385) loss_box_reg: 0.1523 (0.1523) loss_mask: 2.6620 (2.6620) loss_objectness: 0.0130 (0.0130) loss_rpn_box_reg: 0.0076 (0.0076) time: 2.6334 data: 0.0967 max mem: 2303
Epoch: [0] [10/60] eta: 0:00:47 lr: 0.000936 loss: 1.5685 (2.1198) loss_classifier: 0.4478 (0.4967) loss_box_reg: 0.1842 (0.1909) loss_mask: 0.9258 (1.4014) loss_objectness: 0.0196 (0.0203) loss_rpn_box_reg: 0.0090 (0.0105) time: 0.9557 data: 0.0131 max mem: 2859
Epoch: [0] [20/60] eta: 0:00:34 lr: 0.001783 loss: 0.8704 (1.4306) loss_classifier: 0.2360 (0.3400) loss_box_reg: 0.1570 (0.1740) loss_mask: 0.4029 (0.8831) loss_objectness: 0.0196 (0.0215) loss_rpn_box_reg: 0.0099 (0.0120) time: 0.7708 data: 0.0041 max mem: 2862
Epoch: [0] [30/60] eta: 0:00:25 lr: 0.002629 loss: 0.5294 (1.1183) loss_classifier: 0.0927 (0.2557) loss_box_reg: 0.1266 (0.1603) loss_mask: 0.2426 (0.6747) loss_objectness: 0.0060 (0.0160) loss_rpn_box_reg: 0.0099 (0.0116) time: 0.7823 data: 0.0036 max mem: 3595
Epoch: [0] [40/60] eta: 0:00:16 lr: 0.003476 loss: 0.4095 (0.9466) loss_classifier: 0.0617 (0.2089) loss_box_reg: 0.1078 (0.1514) loss_mask: 0.2057 (0.5606) loss_objectness: 0.0037 (0.0133) loss_rpn_box_reg: 0.0116 (0.0124) time: 0.8173 data: 0.0039 max mem: 3595
Epoch: [0] [50/60] eta: 0:00:08 lr: 0.004323 loss: 0.3405 (0.8259) loss_classifier: 0.0479 (0.1784) loss_box_reg: 0.0890 (0.1383) loss_mask: 0.1798 (0.4847) loss_objectness: 0.0025 (0.0118) loss_rpn_box_reg: 0.0116 (0.0128) time: 0.8091 data: 0.0041 max mem: 3595
Epoch: [0] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.2562 (0.7363) loss_classifier: 0.0415 (0.1567) loss_box_reg: 0.0532 (0.1233) loss_mask: 0.1564 (0.4340) loss_objectness: 0.0010 (0.0101) loss_rpn_box_reg: 0.0107 (0.0122) time: 0.7992 data: 0.0039 max mem: 3595
Epoch: [0] Total time: 0:00:49 (0.8252 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:10 model_time: 0.1355 (0.1355) evaluator_time: 0.0021 (0.0021) time: 0.2005 data: 0.0621 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1479 (0.1476) evaluator_time: 0.0023 (0.0042) time: 0.1541 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1560 s / it)
Averaged stats: model_time: 0.1479 (0.1476) evaluator_time: 0.0023 (0.0042)
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.690
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.983
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.871
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.390
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.700
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.312
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.746
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.746
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.747
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.694
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.983
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.882
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.373
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.708
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.314
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.735
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.736
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.650
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.742
Epoch: [1] [ 0/60] eta: 0:00:47 lr: 0.005000 loss: 0.1709 (0.1709) loss_classifier: 0.0213 (0.0213) loss_box_reg: 0.0298 (0.0298) loss_mask: 0.1055 (0.1055) loss_objectness: 0.0015 (0.0015) loss_rpn_box_reg: 0.0128 (0.0128) time: 0.7915 data: 0.0902 max mem: 3595
Epoch: [1] [10/60] eta: 0:00:40 lr: 0.005000 loss: 0.2111 (0.2462) loss_classifier: 0.0332 (0.0370) loss_box_reg: 0.0318 (0.0406) loss_mask: 0.1447 (0.1562) loss_objectness: 0.0009 (0.0011) loss_rpn_box_reg: 0.0124 (0.0113) time: 0.8176 data: 0.0112 max mem: 3595
Epoch: [1] [20/60] eta: 0:00:32 lr: 0.005000 loss: 0.2571 (0.2645) loss_classifier: 0.0402 (0.0460) loss_box_reg: 0.0350 (0.0439) loss_mask: 0.1626 (0.1598) loss_objectness: 0.0009 (0.0016) loss_rpn_box_reg: 0.0129 (0.0132) time: 0.8183 data: 0.0037 max mem: 3595
Epoch: [1] [30/60] eta: 0:00:24 lr: 0.005000 loss: 0.2145 (0.2412) loss_classifier: 0.0367 (0.0404) loss_box_reg: 0.0284 (0.0365) loss_mask: 0.1468 (0.1511) loss_objectness: 0.0009 (0.0013) loss_rpn_box_reg: 0.0086 (0.0118) time: 0.8109 data: 0.0042 max mem: 3595
Epoch: [1] [40/60] eta: 0:00:16 lr: 0.005000 loss: 0.2021 (0.2345) loss_classifier: 0.0317 (0.0404) loss_box_reg: 0.0219 (0.0337) loss_mask: 0.1344 (0.1476) loss_objectness: 0.0006 (0.0016) loss_rpn_box_reg: 0.0079 (0.0112) time: 0.8123 data: 0.0041 max mem: 3595
Epoch: [1] [50/60] eta: 0:00:08 lr: 0.005000 loss: 0.2033 (0.2319) loss_classifier: 0.0358 (0.0412) loss_box_reg: 0.0232 (0.0330) loss_mask: 0.1293 (0.1442) loss_objectness: 0.0006 (0.0018) loss_rpn_box_reg: 0.0080 (0.0118) time: 0.8298 data: 0.0039 max mem: 3595
Epoch: [1] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.1682 (0.2241) loss_classifier: 0.0298 (0.0400) loss_box_reg: 0.0174 (0.0306) loss_mask: 0.1251 (0.1404) loss_objectness: 0.0004 (0.0018) loss_rpn_box_reg: 0.0080 (0.0112) time: 0.8060 data: 0.0038 max mem: 3595
Epoch: [1] Total time: 0:00:48 (0.8142 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:10 model_time: 0.1453 (0.1453) evaluator_time: 0.0022 (0.0022) time: 0.2145 data: 0.0661 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1585 (0.1521) evaluator_time: 0.0025 (0.0036) time: 0.1635 data: 0.0020 max mem: 3595
Test: Total time: 0:00:08 (0.1602 s / it)
Averaged stats: model_time: 0.1585 (0.1521) evaluator_time: 0.0025 (0.0036)
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.771
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.988
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.937
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.524
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.781
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.358
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.820
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.820
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.826
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.763
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.988
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.389
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.773
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.346
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.797
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.797
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.713
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.803
Epoch: [2] [ 0/60] eta: 0:00:53 lr: 0.005000 loss: 0.1299 (0.1299) loss_classifier: 0.0173 (0.0173) loss_box_reg: 0.0072 (0.0072) loss_mask: 0.0994 (0.0994) loss_objectness: 0.0007 (0.0007) loss_rpn_box_reg: 0.0053 (0.0053) time: 0.8846 data: 0.0853 max mem: 3595
Epoch: [2] [10/60] eta: 0:00:40 lr: 0.005000 loss: 0.1884 (0.1756) loss_classifier: 0.0315 (0.0306) loss_box_reg: 0.0154 (0.0166) loss_mask: 0.1135 (0.1197) loss_objectness: 0.0004 (0.0006) loss_rpn_box_reg: 0.0066 (0.0081) time: 0.8066 data: 0.0110 max mem: 3595
Epoch: [2] [20/60] eta: 0:00:31 lr: 0.005000 loss: 0.1510 (0.1623) loss_classifier: 0.0189 (0.0246) loss_box_reg: 0.0119 (0.0133) loss_mask: 0.1107 (0.1166) loss_objectness: 0.0002 (0.0007) loss_rpn_box_reg: 0.0048 (0.0071) time: 0.7697 data: 0.0037 max mem: 3595
Epoch: [2] [30/60] eta: 0:00:23 lr: 0.005000 loss: 0.1591 (0.1821) loss_classifier: 0.0207 (0.0295) loss_box_reg: 0.0104 (0.0172) loss_mask: 0.1164 (0.1260) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0074 (0.0086) time: 0.7821 data: 0.0038 max mem: 3595
Epoch: [2] [40/60] eta: 0:00:15 lr: 0.005000 loss: 0.1827 (0.1824) loss_classifier: 0.0289 (0.0286) loss_box_reg: 0.0144 (0.0167) loss_mask: 0.1318 (0.1276) loss_objectness: 0.0003 (0.0008) loss_rpn_box_reg: 0.0077 (0.0087) time: 0.8254 data: 0.0041 max mem: 3595
Epoch: [2] [50/60] eta: 0:00:08 lr: 0.005000 loss: 0.1878 (0.1862) loss_classifier: 0.0298 (0.0290) loss_box_reg: 0.0154 (0.0176) loss_mask: 0.1324 (0.1297) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0083 (0.0091) time: 0.8146 data: 0.0039 max mem: 3595
Epoch: [2] [59/60] eta: 0:00:00 lr: 0.005000 loss: 0.1878 (0.1876) loss_classifier: 0.0323 (0.0300) loss_box_reg: 0.0160 (0.0176) loss_mask: 0.1293 (0.1294) loss_objectness: 0.0005 (0.0010) loss_rpn_box_reg: 0.0094 (0.0095) time: 0.8387 data: 0.0037 max mem: 3595
Epoch: [2] Total time: 0:00:48 (0.8130 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:09 model_time: 0.1336 (0.1336) evaluator_time: 0.0022 (0.0022) time: 0.1977 data: 0.0612 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1465 (0.1468) evaluator_time: 0.0020 (0.0031) time: 0.1518 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1542 s / it)
Averaged stats: model_time: 0.1465 (0.1468) evaluator_time: 0.0020 (0.0031)
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.989
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.946
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.470
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.813
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.841
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.841
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.847
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.745
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.989
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.925
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.401
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.345
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.783
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.783
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.613
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.795
Epoch: [3] [ 0/60] eta: 0:00:57 lr: 0.000500 loss: 0.1744 (0.1744) loss_classifier: 0.0190 (0.0190) loss_box_reg: 0.0126 (0.0126) loss_mask: 0.1370 (0.1370) loss_objectness: 0.0001 (0.0001) loss_rpn_box_reg: 0.0057 (0.0057) time: 0.9517 data: 0.1323 max mem: 3595
Epoch: [3] [10/60] eta: 0:00:43 lr: 0.000500 loss: 0.1701 (0.1784) loss_classifier: 0.0271 (0.0279) loss_box_reg: 0.0121 (0.0151) loss_mask: 0.1171 (0.1272) loss_objectness: 0.0006 (0.0007) loss_rpn_box_reg: 0.0060 (0.0076) time: 0.8605 data: 0.0146 max mem: 3595
Epoch: [3] [20/60] eta: 0:00:33 lr: 0.000500 loss: 0.1639 (0.1734) loss_classifier: 0.0271 (0.0275) loss_box_reg: 0.0099 (0.0138) loss_mask: 0.1199 (0.1235) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0060 (0.0079) time: 0.8288 data: 0.0034 max mem: 3595
Epoch: [3] [30/60] eta: 0:00:24 lr: 0.000500 loss: 0.1571 (0.1701) loss_classifier: 0.0241 (0.0262) loss_box_reg: 0.0085 (0.0129) loss_mask: 0.1203 (0.1229) loss_objectness: 0.0004 (0.0008) loss_rpn_box_reg: 0.0055 (0.0073) time: 0.7733 data: 0.0038 max mem: 3595
Epoch: [3] [40/60] eta: 0:00:16 lr: 0.000500 loss: 0.1577 (0.1724) loss_classifier: 0.0245 (0.0269) loss_box_reg: 0.0108 (0.0133) loss_mask: 0.1130 (0.1232) loss_objectness: 0.0007 (0.0009) loss_rpn_box_reg: 0.0065 (0.0082) time: 0.7781 data: 0.0038 max mem: 3595
Epoch: [3] [50/60] eta: 0:00:08 lr: 0.000500 loss: 0.1741 (0.1774) loss_classifier: 0.0278 (0.0275) loss_box_reg: 0.0116 (0.0143) loss_mask: 0.1303 (0.1265) loss_objectness: 0.0004 (0.0009) loss_rpn_box_reg: 0.0078 (0.0082) time: 0.8271 data: 0.0040 max mem: 3595
Epoch: [3] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1501 (0.1721) loss_classifier: 0.0269 (0.0266) loss_box_reg: 0.0093 (0.0133) loss_mask: 0.1049 (0.1231) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0078 (0.0081) time: 0.8225 data: 0.0041 max mem: 3595
Epoch: [3] Total time: 0:00:48 (0.8145 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:09 model_time: 0.1334 (0.1334) evaluator_time: 0.0021 (0.0021) time: 0.1983 data: 0.0620 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1473 (0.1432) evaluator_time: 0.0019 (0.0030) time: 0.1507 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1504 s / it)
Averaged stats: model_time: 0.1473 (0.1432) evaluator_time: 0.0019 (0.0030)
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.817
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.941
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.476
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.829
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.762
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.765
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.919
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.448
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.777
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.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.700
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.811
Epoch: [4] [ 0/60] eta: 0:00:42 lr: 0.000500 loss: 0.1048 (0.1048) loss_classifier: 0.0069 (0.0069) loss_box_reg: 0.0029 (0.0029) loss_mask: 0.0903 (0.0903) loss_objectness: 0.0001 (0.0001) loss_rpn_box_reg: 0.0046 (0.0046) time: 0.7136 data: 0.0856 max mem: 3595
Epoch: [4] [10/60] eta: 0:00:40 lr: 0.000500 loss: 0.1483 (0.1592) loss_classifier: 0.0231 (0.0214) loss_box_reg: 0.0106 (0.0124) loss_mask: 0.1064 (0.1175) loss_objectness: 0.0002 (0.0004) loss_rpn_box_reg: 0.0076 (0.0075) time: 0.8011 data: 0.0111 max mem: 3595
Epoch: [4] [20/60] eta: 0:00:31 lr: 0.000500 loss: 0.1483 (0.1608) loss_classifier: 0.0231 (0.0229) loss_box_reg: 0.0079 (0.0115) loss_mask: 0.1064 (0.1193) loss_objectness: 0.0002 (0.0004) loss_rpn_box_reg: 0.0061 (0.0067) time: 0.7832 data: 0.0039 max mem: 3595
Epoch: [4] [30/60] eta: 0:00:23 lr: 0.000500 loss: 0.1397 (0.1650) loss_classifier: 0.0261 (0.0260) loss_box_reg: 0.0078 (0.0122) loss_mask: 0.1033 (0.1185) loss_objectness: 0.0003 (0.0008) loss_rpn_box_reg: 0.0060 (0.0075) time: 0.7800 data: 0.0043 max mem: 3595
Epoch: [4] [40/60] eta: 0:00:16 lr: 0.000500 loss: 0.1451 (0.1627) loss_classifier: 0.0235 (0.0257) loss_box_reg: 0.0093 (0.0119) loss_mask: 0.1079 (0.1170) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0062 (0.0072) time: 0.8241 data: 0.0042 max mem: 3595
Epoch: [4] [50/60] eta: 0:00:08 lr: 0.000500 loss: 0.1587 (0.1632) loss_classifier: 0.0239 (0.0259) loss_box_reg: 0.0093 (0.0118) loss_mask: 0.1092 (0.1169) loss_objectness: 0.0003 (0.0008) loss_rpn_box_reg: 0.0068 (0.0078) time: 0.8400 data: 0.0041 max mem: 3595
Epoch: [4] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1587 (0.1661) loss_classifier: 0.0276 (0.0262) loss_box_reg: 0.0079 (0.0126) loss_mask: 0.1106 (0.1184) loss_objectness: 0.0003 (0.0010) loss_rpn_box_reg: 0.0080 (0.0080) time: 0.8359 data: 0.0044 max mem: 3595
Epoch: [4] Total time: 0:00:48 (0.8121 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:10 model_time: 0.1360 (0.1360) evaluator_time: 0.0019 (0.0019) time: 0.2020 data: 0.0633 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1543 (0.1492) evaluator_time: 0.0020 (0.0031) time: 0.1577 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1568 s / it)
Averaged stats: model_time: 0.1543 (0.1492) evaluator_time: 0.0020 (0.0031)
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.939
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.532
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.833
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.866
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.866
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.875
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.759
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
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.406
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.771
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.346
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.700
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.810
Epoch: [5] [ 0/60] eta: 0:01:09 lr: 0.000500 loss: 0.1493 (0.1493) loss_classifier: 0.0173 (0.0173) loss_box_reg: 0.0064 (0.0064) loss_mask: 0.1195 (0.1195) loss_objectness: 0.0003 (0.0003) loss_rpn_box_reg: 0.0058 (0.0058) time: 1.1576 data: 0.1904 max mem: 3595
Epoch: [5] [10/60] eta: 0:00:39 lr: 0.000500 loss: 0.1460 (0.1500) loss_classifier: 0.0202 (0.0213) loss_box_reg: 0.0084 (0.0094) loss_mask: 0.1132 (0.1126) loss_objectness: 0.0002 (0.0006) loss_rpn_box_reg: 0.0055 (0.0061) time: 0.7865 data: 0.0191 max mem: 3595
Epoch: [5] [20/60] eta: 0:00:30 lr: 0.000500 loss: 0.1351 (0.1456) loss_classifier: 0.0201 (0.0205) loss_box_reg: 0.0064 (0.0088) loss_mask: 0.1034 (0.1097) loss_objectness: 0.0002 (0.0005) loss_rpn_box_reg: 0.0054 (0.0062) time: 0.7460 data: 0.0027 max mem: 3595
Epoch: [5] [30/60] eta: 0:00:23 lr: 0.000500 loss: 0.1419 (0.1600) loss_classifier: 0.0244 (0.0244) loss_box_reg: 0.0083 (0.0117) loss_mask: 0.1038 (0.1158) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0071 (0.0075) time: 0.7701 data: 0.0037 max mem: 3595
Epoch: [5] [40/60] eta: 0:00:15 lr: 0.000500 loss: 0.1620 (0.1620) loss_classifier: 0.0268 (0.0247) loss_box_reg: 0.0113 (0.0120) loss_mask: 0.1163 (0.1168) loss_objectness: 0.0004 (0.0007) loss_rpn_box_reg: 0.0085 (0.0078) time: 0.8153 data: 0.0039 max mem: 3595
Epoch: [5] [50/60] eta: 0:00:07 lr: 0.000500 loss: 0.1441 (0.1581) loss_classifier: 0.0229 (0.0242) loss_box_reg: 0.0081 (0.0110) loss_mask: 0.1041 (0.1148) loss_objectness: 0.0003 (0.0007) loss_rpn_box_reg: 0.0067 (0.0075) time: 0.8283 data: 0.0042 max mem: 3595
Epoch: [5] [59/60] eta: 0:00:00 lr: 0.000500 loss: 0.1449 (0.1596) loss_classifier: 0.0217 (0.0249) loss_box_reg: 0.0070 (0.0111) loss_mask: 0.1044 (0.1154) loss_objectness: 0.0002 (0.0007) loss_rpn_box_reg: 0.0070 (0.0076) time: 0.8396 data: 0.0043 max mem: 3595
Epoch: [5] Total time: 0:00:48 (0.8076 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:10 model_time: 0.1335 (0.1335) evaluator_time: 0.0023 (0.0023) time: 0.2000 data: 0.0635 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1466 (0.1485) evaluator_time: 0.0020 (0.0031) time: 0.1563 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1559 s / it)
Averaged stats: model_time: 0.1466 (0.1485) evaluator_time: 0.0020 (0.0031)
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.815
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.940
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.542
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.825
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.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.775
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.864
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.765
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.932
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.428
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.808
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.808
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.813
Epoch: [6] [ 0/60] eta: 0:00:56 lr: 0.000050 loss: 0.1720 (0.1720) loss_classifier: 0.0306 (0.0306) loss_box_reg: 0.0119 (0.0119) loss_mask: 0.1225 (0.1225) loss_objectness: 0.0001 (0.0001) loss_rpn_box_reg: 0.0069 (0.0069) time: 0.9433 data: 0.0828 max mem: 3595
Epoch: [6] [10/60] eta: 0:00:41 lr: 0.000050 loss: 0.1458 (0.1465) loss_classifier: 0.0210 (0.0226) loss_box_reg: 0.0059 (0.0078) loss_mask: 0.1034 (0.1104) loss_objectness: 0.0002 (0.0004) loss_rpn_box_reg: 0.0059 (0.0053) time: 0.8372 data: 0.0108 max mem: 3595
Epoch: [6] [20/60] eta: 0:00:33 lr: 0.000050 loss: 0.1448 (0.1537) loss_classifier: 0.0210 (0.0245) loss_box_reg: 0.0071 (0.0105) loss_mask: 0.1019 (0.1116) loss_objectness: 0.0002 (0.0005) loss_rpn_box_reg: 0.0059 (0.0066) time: 0.8248 data: 0.0037 max mem: 3595
Epoch: [6] [30/60] eta: 0:00:24 lr: 0.000050 loss: 0.1481 (0.1547) loss_classifier: 0.0230 (0.0261) loss_box_reg: 0.0088 (0.0102) loss_mask: 0.1019 (0.1107) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0074 (0.0068) time: 0.8078 data: 0.0037 max mem: 3595
Epoch: [6] [40/60] eta: 0:00:16 lr: 0.000050 loss: 0.1484 (0.1617) loss_classifier: 0.0260 (0.0269) loss_box_reg: 0.0094 (0.0116) loss_mask: 0.1055 (0.1148) loss_objectness: 0.0003 (0.0011) loss_rpn_box_reg: 0.0071 (0.0072) time: 0.7847 data: 0.0035 max mem: 3595
Epoch: [6] [50/60] eta: 0:00:08 lr: 0.000050 loss: 0.1445 (0.1607) loss_classifier: 0.0221 (0.0264) loss_box_reg: 0.0104 (0.0114) loss_mask: 0.1101 (0.1146) loss_objectness: 0.0004 (0.0010) loss_rpn_box_reg: 0.0071 (0.0073) time: 0.7750 data: 0.0036 max mem: 3595
Epoch: [6] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1445 (0.1610) loss_classifier: 0.0230 (0.0261) loss_box_reg: 0.0077 (0.0114) loss_mask: 0.1101 (0.1151) loss_objectness: 0.0004 (0.0011) loss_rpn_box_reg: 0.0071 (0.0073) time: 0.7916 data: 0.0036 max mem: 3595
Epoch: [6] Total time: 0:00:48 (0.8018 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:09 model_time: 0.1334 (0.1334) evaluator_time: 0.0020 (0.0020) time: 0.1978 data: 0.0616 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1474 (0.1430) evaluator_time: 0.0020 (0.0029) time: 0.1501 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1502 s / it)
Averaged stats: model_time: 0.1474 (0.1430) evaluator_time: 0.0020 (0.0029)
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.940
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.553
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.830
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.377
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.764
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.932
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.418
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.775
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.738
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.811
Epoch: [7] [ 0/60] eta: 0:00:49 lr: 0.000050 loss: 0.1097 (0.1097) loss_classifier: 0.0113 (0.0113) loss_box_reg: 0.0037 (0.0037) loss_mask: 0.0925 (0.0925) loss_objectness: 0.0011 (0.0011) loss_rpn_box_reg: 0.0011 (0.0011) time: 0.8293 data: 0.1411 max mem: 3595
Epoch: [7] [10/60] eta: 0:00:38 lr: 0.000050 loss: 0.1355 (0.1430) loss_classifier: 0.0191 (0.0210) loss_box_reg: 0.0049 (0.0072) loss_mask: 0.1026 (0.1089) loss_objectness: 0.0003 (0.0004) loss_rpn_box_reg: 0.0040 (0.0056) time: 0.7626 data: 0.0151 max mem: 3595
Epoch: [7] [20/60] eta: 0:00:32 lr: 0.000050 loss: 0.1482 (0.1526) loss_classifier: 0.0247 (0.0256) loss_box_reg: 0.0073 (0.0095) loss_mask: 0.1060 (0.1100) loss_objectness: 0.0002 (0.0005) loss_rpn_box_reg: 0.0062 (0.0070) time: 0.8048 data: 0.0031 max mem: 3595
Epoch: [7] [30/60] eta: 0:00:23 lr: 0.000050 loss: 0.1438 (0.1497) loss_classifier: 0.0247 (0.0246) loss_box_reg: 0.0073 (0.0090) loss_mask: 0.1056 (0.1087) loss_objectness: 0.0002 (0.0005) loss_rpn_box_reg: 0.0069 (0.0069) time: 0.8128 data: 0.0036 max mem: 3595
Epoch: [7] [40/60] eta: 0:00:15 lr: 0.000050 loss: 0.1410 (0.1530) loss_classifier: 0.0207 (0.0243) loss_box_reg: 0.0074 (0.0099) loss_mask: 0.1070 (0.1114) loss_objectness: 0.0003 (0.0006) loss_rpn_box_reg: 0.0053 (0.0069) time: 0.7771 data: 0.0036 max mem: 3595
Epoch: [7] [50/60] eta: 0:00:07 lr: 0.000050 loss: 0.1581 (0.1577) loss_classifier: 0.0201 (0.0241) loss_box_reg: 0.0089 (0.0108) loss_mask: 0.1107 (0.1150) loss_objectness: 0.0007 (0.0007) loss_rpn_box_reg: 0.0072 (0.0072) time: 0.7750 data: 0.0035 max mem: 3595
Epoch: [7] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1485 (0.1578) loss_classifier: 0.0201 (0.0243) loss_box_reg: 0.0061 (0.0108) loss_mask: 0.1099 (0.1149) loss_objectness: 0.0008 (0.0007) loss_rpn_box_reg: 0.0059 (0.0072) time: 0.7780 data: 0.0035 max mem: 3595
Epoch: [7] Total time: 0:00:47 (0.7868 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:10 model_time: 0.1344 (0.1344) evaluator_time: 0.0022 (0.0022) time: 0.2001 data: 0.0626 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1460 (0.1428) evaluator_time: 0.0019 (0.0030) time: 0.1500 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1502 s / it)
Averaged stats: model_time: 0.1460 (0.1428) evaluator_time: 0.0019 (0.0030)
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.940
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.553
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.830
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.377
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.765
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.932
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.430
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.352
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.808
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.808
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.813
Epoch: [8] [ 0/60] eta: 0:00:54 lr: 0.000050 loss: 0.1661 (0.1661) loss_classifier: 0.0293 (0.0293) loss_box_reg: 0.0071 (0.0071) loss_mask: 0.1191 (0.1191) loss_objectness: 0.0076 (0.0076) loss_rpn_box_reg: 0.0029 (0.0029) time: 0.9051 data: 0.1844 max mem: 3595
Epoch: [8] [10/60] eta: 0:00:39 lr: 0.000050 loss: 0.1512 (0.1534) loss_classifier: 0.0226 (0.0231) loss_box_reg: 0.0071 (0.0108) loss_mask: 0.1086 (0.1121) loss_objectness: 0.0002 (0.0011) loss_rpn_box_reg: 0.0044 (0.0063) time: 0.7955 data: 0.0189 max mem: 3595
Epoch: [8] [20/60] eta: 0:00:31 lr: 0.000050 loss: 0.1517 (0.1618) loss_classifier: 0.0225 (0.0246) loss_box_reg: 0.0097 (0.0118) loss_mask: 0.1076 (0.1172) loss_objectness: 0.0002 (0.0009) loss_rpn_box_reg: 0.0068 (0.0073) time: 0.7798 data: 0.0029 max mem: 3595
Epoch: [8] [30/60] eta: 0:00:23 lr: 0.000050 loss: 0.1379 (0.1574) loss_classifier: 0.0225 (0.0241) loss_box_reg: 0.0091 (0.0121) loss_mask: 0.1016 (0.1134) loss_objectness: 0.0002 (0.0006) loss_rpn_box_reg: 0.0074 (0.0072) time: 0.7700 data: 0.0036 max mem: 3595
Epoch: [8] [40/60] eta: 0:00:15 lr: 0.000050 loss: 0.1505 (0.1647) loss_classifier: 0.0240 (0.0261) loss_box_reg: 0.0099 (0.0125) loss_mask: 0.1127 (0.1177) loss_objectness: 0.0003 (0.0008) loss_rpn_box_reg: 0.0073 (0.0076) time: 0.7909 data: 0.0037 max mem: 3595
Epoch: [8] [50/60] eta: 0:00:07 lr: 0.000050 loss: 0.1566 (0.1640) loss_classifier: 0.0252 (0.0266) loss_box_reg: 0.0097 (0.0122) loss_mask: 0.1176 (0.1162) loss_objectness: 0.0004 (0.0009) loss_rpn_box_reg: 0.0076 (0.0081) time: 0.8186 data: 0.0037 max mem: 3595
Epoch: [8] [59/60] eta: 0:00:00 lr: 0.000050 loss: 0.1460 (0.1603) loss_classifier: 0.0229 (0.0254) loss_box_reg: 0.0062 (0.0113) loss_mask: 0.1032 (0.1153) loss_objectness: 0.0003 (0.0009) loss_rpn_box_reg: 0.0053 (0.0074) time: 0.7792 data: 0.0036 max mem: 3595
Epoch: [8] Total time: 0:00:47 (0.7848 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:09 model_time: 0.1338 (0.1338) evaluator_time: 0.0022 (0.0022) time: 0.1986 data: 0.0617 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1465 (0.1430) evaluator_time: 0.0020 (0.0029) time: 0.1504 data: 0.0020 max mem: 3595
Test: Total time: 0:00:07 (0.1502 s / it)
Averaged stats: model_time: 0.1465 (0.1430) evaluator_time: 0.0020 (0.0029)
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.939
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.553
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.830
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.863
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.863
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.765
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.932
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.430
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.775
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.808
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.808
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.813
Epoch: [9] [ 0/60] eta: 0:00:48 lr: 0.000005 loss: 0.1442 (0.1442) loss_classifier: 0.0140 (0.0140) loss_box_reg: 0.0034 (0.0034) loss_mask: 0.1234 (0.1234) loss_objectness: 0.0002 (0.0002) loss_rpn_box_reg: 0.0032 (0.0032) time: 0.8146 data: 0.0761 max mem: 3595
Epoch: [9] [10/60] eta: 0:00:39 lr: 0.000005 loss: 0.1442 (0.1671) loss_classifier: 0.0200 (0.0212) loss_box_reg: 0.0095 (0.0119) loss_mask: 0.1228 (0.1254) loss_objectness: 0.0003 (0.0022) loss_rpn_box_reg: 0.0055 (0.0064) time: 0.7829 data: 0.0101 max mem: 3595
Epoch: [9] [20/60] eta: 0:00:31 lr: 0.000005 loss: 0.1593 (0.1659) loss_classifier: 0.0248 (0.0246) loss_box_reg: 0.0095 (0.0121) loss_mask: 0.1177 (0.1209) loss_objectness: 0.0003 (0.0016) loss_rpn_box_reg: 0.0055 (0.0066) time: 0.7862 data: 0.0036 max mem: 3595
Epoch: [9] [30/60] eta: 0:00:23 lr: 0.000005 loss: 0.1593 (0.1684) loss_classifier: 0.0265 (0.0264) loss_box_reg: 0.0088 (0.0128) loss_mask: 0.1139 (0.1202) loss_objectness: 0.0004 (0.0016) loss_rpn_box_reg: 0.0063 (0.0074) time: 0.7912 data: 0.0036 max mem: 3595
Epoch: [9] [40/60] eta: 0:00:15 lr: 0.000005 loss: 0.1467 (0.1608) loss_classifier: 0.0233 (0.0248) loss_box_reg: 0.0077 (0.0115) loss_mask: 0.1032 (0.1163) loss_objectness: 0.0004 (0.0013) loss_rpn_box_reg: 0.0064 (0.0070) time: 0.7813 data: 0.0036 max mem: 3595
Epoch: [9] [50/60] eta: 0:00:07 lr: 0.000005 loss: 0.1487 (0.1593) loss_classifier: 0.0215 (0.0247) loss_box_reg: 0.0080 (0.0111) loss_mask: 0.1077 (0.1152) loss_objectness: 0.0002 (0.0011) loss_rpn_box_reg: 0.0060 (0.0072) time: 0.8089 data: 0.0036 max mem: 3595
Epoch: [9] [59/60] eta: 0:00:00 lr: 0.000005 loss: 0.1528 (0.1603) loss_classifier: 0.0215 (0.0251) loss_box_reg: 0.0077 (0.0108) loss_mask: 0.1093 (0.1161) loss_objectness: 0.0002 (0.0010) loss_rpn_box_reg: 0.0060 (0.0072) time: 0.8113 data: 0.0036 max mem: 3595
Epoch: [9] Total time: 0:00:47 (0.7922 s / it)
creating index...
index created!
Test: [ 0/50] eta: 0:00:09 model_time: 0.1336 (0.1336) evaluator_time: 0.0021 (0.0021) time: 0.1983 data: 0.0618 max mem: 3595
Test: [49/50] eta: 0:00:00 model_time: 0.1473 (0.1434) evaluator_time: 0.0020 (0.0029) time: 0.1519 data: 0.0019 max mem: 3595
Test: Total time: 0:00:07 (0.1505 s / it)
Averaged stats: model_time: 0.1473 (0.1434) evaluator_time: 0.0020 (0.0029)
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.939
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.553
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.379
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.864
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.864
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.869
IoU metric: segm
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.763
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.990
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.932
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.430
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.773
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.807
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.807
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.812
img, _ = dataset_test[0]
model.eval()
with torch.no_grad():
prediction = model([img.to(device)])
prediction
[{'boxes': tensor([[ 59.3467, 44.0603, 195.7051, 326.9784],
[276.5097, 22.4848, 290.8961, 73.5858],
[ 80.4872, 38.2383, 190.3802, 218.9982]], device='cuda:0'),
'labels': tensor([1, 1, 1], device='cuda:0'),
'scores': tensor([0.9994, 0.8514, 0.1090], 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')}]
Image.fromarray(img.mul(255).permute(1, 2, 0).byte().numpy())

Image.fromarray(prediction[0]['masks'][0, 0].mul(255).byte().cpu().numpy())
