大图如下

在其中搜索如下两个小图标


请问用paddleclas或paddlehub怎么搜索?以及如何搭建环境?
大图如下

在其中搜索如下两个小图标


请问用paddleclas或paddlehub怎么搜索?以及如何搭建环境?
关注引自免费微信小程序:皆我百晓生
import cv2
# 读取大图和小图
large_image = cv2.imread('test55.jpg')
small_image = cv2.imread('test53.jpg')
# 在大图中查找小图的位置
result = cv2.matchTemplate(large_image, small_image, cv2.TM_CCOEFF_NORMED)
min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(result)
# 获取小图的宽度和高度
small_image_width = small_image.shape[1]
small_image_height = small_image.shape[0]
# 标记小图所在位置
top_left = max_loc
bottom_right = (top_left[0] + small_image_width, top_left[1] + small_image_height)
cv2.rectangle(large_image, top_left, bottom_right, (0, 255, 0), 2)
# 显示标记后的大图
cv2.imshow('Large Image', large_image)
cv2.waitKey(0)
cv2.destroyAllWindows()