The application provides a detection method and device for the object in the image, the image to be detected is segmented to obtain each image block corresponding to the image to be detected, the detection results of each image block are obtained by detecting each image block, and the detection results of the image to be detected are obtained based on the detection results of each image block. Although the proportion of the target in the image to be detected is very small or the absolute size of the target is very small, the proportion of the target in the image block increases or the absolute size of the target in the image block changes. In the process of detection, the target will not be caused by the small proportion of the target in the image or the absolute size of the target is very small. Misjudged as image noise, and then by integrating the corresponding detection results of each image block to obtain the detection results of the image to be detected, in order to identify the target in the image to be detected, so as to accurately identify the target in the image to be detected and improve the detection accuracy.
【技术实现步骤摘要】
一种图像中目标物的检测方法及装置
本申请属于图像处理
,尤其涉及一种图像中目标物的检测方法及装置。
技术介绍
目前通过深度学习模型在检测图像中目标物(如物体表面缺陷)时,当目标物在图像中所占的比例很小或者目标物的绝对尺寸很小(比如一幅图的尺寸为2000*2000,而图像中的目标物只有几十甚至十几个像素),并且目标物与图像背景的对比度不高时,会因为目标物本身的特征不够明显导致目标物被视为是图像噪声,从而忽略掉图像中的目标物,降低检测准确度。
技术实现思路
有鉴于此,本申请的目的在于提供一种图像中目标物的检测方法及装置,用于提高识别待检测图像中目标物的准确度。本申请提供一种图像中目标物的检测方法,所述方法包括:对待检测图像进行分割,得到所述待检测图像对应的各个图像块;对所述各个图像块进行检测,得到所述各个图像块的检测结果;基于所述各个图像块的检测结果,获得所述待检测图像的检测结果,所述待检测图像的检测结果用于表示待检测图像中是否存在目标物。优选的,所述对所述各个图 ...
【技术保护点】
1.一种图像中目标物的检测方法,其特征在于,所述方法包括:/n对待检测图像进行分割,得到所述待检测图像对应的各个图像块;/n对所述各个图像块进行检测,得到所述各个图像块的检测结果;/n基于所述各个图像块的检测结果,获得所述待检测图像的检测结果,所述待检测图像的检测结果用于表示待检测图像中是否存在目标物。/n
【技术特征摘要】
1.一种图像中目标物的检测方法,其特征在于,所述方法包括:
对待检测图像进行分割,得到所述待检测图像对应的各个图像块;
对所述各个图像块进行检测,得到所述各个图像块的检测结果;
基于所述各个图像块的检测结果,获得所述待检测图像的检测结果,所述待检测图像的检测结果用于表示待检测图像中是否存在目标物。
2.根据权利要求1所述的方法,其特征在于,所述对所述各个图像块进行检测,得到所述各个图像块的检测结果包括:
通过预设模型的调用,获得所述预设模型输出的各个图像块的检测结果,所述预设模型是基于已有图像块以及已有图像块的标注数据进行训练得到,所述已有图像块的标注数据用于指示已有图像块是否有目标物。
3.根据权利要求1所述的方法,其特征在于,所述基于所述各个图像块的检测结果,获得所述待检测图像的检测结果包括:
如果至少一个图像块的检测结果表明所述图像块中存在目标物,获得表明存在目标物的检测结果对应的图像块中目标物的坐标;
基于各个表明存在目标物的检测结果对应的图像块中目标物的坐标,获得所述待检测图像中目标物的坐标,所述待检测图像中目标物的坐标为所述待检测图像的检测结果。
4.根据权利要求3所述的方法,其特征在于,所述基于各个表明存在目标物的检测结果对应的图像块中目标物的坐标,获得所述待检测图像中目标物的坐标包括:
获得各个表明存在目标物的检测结果对应的图像块在所述待检测图像中的位置;
基于所述图像块在所述待检测图像中的位置以及各个表明存在目标物的检测结果对应的图像块中目标物的坐标,获得所述待检测图像中目标物的坐标。
5.根据权利要求4所述的方法,其特征在于,所述基于所述图像块在所述待检测图像中的位置以及各个表明存在目标物的检测结果对应的图像块中目标物的坐标,获得所述待检测图像中目标物的坐标包括:
如果表明存在目标物的检测结果对应的图像块为至少两个图像块,基于所述至少两个图像块中每个图像块在所有图像块中的位置以及表明存在目标物的...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。