Mask_RCNN

所属分类:模式识别(视觉/语音等)
开发工具:Python
文件大小:92989KB
下载次数:0
上传日期:2020-08-20 05:28:15
上 传 者sh-1993
说明:  Pytorch编程的掩模R-CNN模型。
(Mask R-CNN model programmed by Pytorch.)

文件列表:
.idea (0, 2020-08-20)
.idea\Mask_RCNN.iml (596, 2020-08-20)
.idea\deployment.xml (687, 2020-08-20)
.idea\inspectionProfiles (0, 2020-08-20)
.idea\inspectionProfiles\profiles_settings.xml (174, 2020-08-20)
.idea\misc.xml (394, 2020-08-20)
.idea\modules.xml (277, 2020-08-20)
.idea\vcs.xml (241, 2020-08-20)
Evaluation (0, 2020-08-20)
Evaluation\Measurement.py (5304, 2020-08-20)
Note.docx (14624, 2020-08-20)
Run.py (1508, 2020-08-20)
__init__.py (0, 2020-08-20)
dataset (0, 2020-08-20)
dataset\Observation.py (796, 2020-08-20)
dataset\coco.py (5294, 2020-08-20)
dataset\shapes.py (8417, 2020-08-20)
draft.py (1853, 2020-08-20)
inference.py (2399, 2020-08-20)
inference2.py (2667, 2020-08-20)
model (0, 2020-08-20)
model\FunctionLayers.py (21797, 2020-08-20)
model\LossFunction.py (15389, 2020-08-20)
model\Model.py (9727, 2020-08-20)
model\NetworkLayers.py (16540, 2020-08-20)
model\Utils.py (16237, 2020-08-20)
model\Visualization.py (7942, 2020-08-20)
model\__init__.py (0, 2020-08-20)
model\__pycache__ (0, 2020-08-20)
model\__pycache__\Visualization.cpython-37.pyc (6527, 2020-08-20)
model\__pycache__\__init__.cpython-37.pyc (142, 2020-08-20)
run2.py (8631, 2020-08-20)
save (0, 2020-08-20)
save\resnet50-19c8e357.pth (102502400, 2020-08-20)
~$Note.docx (162, 2020-08-20)

# Mask_RCNN Mask R-CNN model programmed by Pytorch.
Note: Not perfect yet. Still under revision. ## Data Form The input and output form of the model every batch. ###Input: 'max_instance_per_img' should be defined by the max instance number of one image throughout the dataset. images: (batch, channel, h, w) The input images. gt_boxes: (batch, max_instance_per_img, [y1, x1, y2, x2]). Float. The boxes of the target instances. The box is interpreted in form of left-bottom(y1, x1) and right-upper(y2, x2) point of the box. Use zero paddings if there is not enough instances to an image. Note that it is (y, x) form but not (x, y), and in normalized coordinates. gt_class_ids: (batch, max_instance_per_img). Int. The categories of the target instances. Use zero paddings if there is not enough instances to an image. Note that the id should begin from 1. gt_masks: (batch, max_instance_per_img, h, w) The mask of the target instances. Should contain only 0 and 1. Use zero paddings if there is not enough instances to an image. ###Output: 'detection_max_instance' can be set by yourself, and can be different to 'max_instance_per_img'. detection_boxes: (batch, detection_max_instance, [y1, x1, y2, x2]) The boxes of the detections. detection_classes: (batch, detection_max_instance, [class_id]) The categories of the detections. detection_scores: (batch, detection_max_instance, [score]) The confidence score of the detections. mrcnn_masks: (batch, num_rois, n_classes, mask_h, mask_w) The masks of the detections. Note that the size of masks is different to the original images. Should align to the box size and then apply to the image. ### E.g. There are three images with 1 channel in a batch. Resolution ratio is 256 * 256.
To detect 'dog', 'cat', 'rat' in the images, take 1, 2, 3 as their class ids.
Image1: have a dog, a cat and two rat.
Image2: have a dog, and a cat.
Image3: have a dog, and a rat. images: (3, 1, 256, 256) gt_boxes: (3, 4, [y1, x1, y2, x2]) Array: [[[0.1, 0.2, 0.4, 0.3], [0.3, 0.4, 0.7, 0.8], [0.7, 0.8, 0.8, 0.9], [0.2, 0.1, 0.3, 0.4]], [[0.5, 0.3, 0.7, 0.4], [0.3, 0.5, 0.4, 0.8], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.3, 0.2, 0.4, 0.3], [0.3, 0.5, 0.7, 0.8], [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0]] gt_class_ids: (3, 4). Array: [[1, 2, 3, 3], [1, 2, 0, 0], [3, 2, 0, 0]] gt_masks: (3, 4, 256, 256). With zero paddings.

近期下载者

相关文件


收藏者