首页 > 解决方案 > 对象检测 API:Faster-RCNN,图像尺寸问题

问题描述

我已经在 Image Size: 720*700 pxs 上训练了我的模型,并修改了以下两个文件。一世。对象检测/核心/预处理器.py:

def resize_image(image,
                 masks=None,
                 new_height=4160,
                 new_width=3120,
                 method=tf.image.ResizeMethod.BILINEAR,
                 align_corners=False):

ii. 对象检测/训练/faster_rcnn_inception_v2_pets.config

model {
  faster_rcnn {
    num_classes: 10
    image_resizer {
      keep_aspect_ratio_resizer {
        min_dimension: 3120
        max_dimension: 4160
      }
    }

两个代码片段的功能是什么?如果之前训练的图像是 600*600,这些代码会将我的图像调整为 3120*4160 吗?其次,当我在图像尺寸:3120*4160 上使用经过训练的模型进行检测和分类时,图像被随机裁剪,我没有在对象检测中获得整个图像。

任何帮助,将不胜感激。

标签: pythonobjectclassificationdetectionfaster-rcnn

解决方案


推荐阅读