类 DetectorModel
- java.lang.Object
-
- cn.smartjavaai.objectdetection.model.DetectorModel
-
- 所有已实现的接口:
AutoCloseable
public class DetectorModel extends Object implements AutoCloseable
目标检测模型- 作者:
- dwj
-
-
构造器概要
构造器 构造器 说明 DetectorModel()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidclose()显式释放资源(必须调用!)DetectionResponsedetect(byte[] imageData)目标检测DetectionResponsedetect(BufferedImage image)目标检测DetectionResponsedetect(String imagePath)目标检测BufferedImagedetectAndDraw(BufferedImage sourceImage)目标检测-将检测结果绘制到原图voiddetectAndDraw(String imagePath, String outputPath)目标检测-将检测结果绘制到原图voidloadModel(DetectorModelConfig config)
-
-
-
方法详细资料
-
loadModel
public void loadModel(DetectorModelConfig config)
-
detect
public DetectionResponse detect(String imagePath)
目标检测- 参数:
imagePath-- 返回:
- 抛出:
Exception
-
detectAndDraw
public void detectAndDraw(String imagePath, String outputPath)
目标检测-将检测结果绘制到原图- 参数:
imagePath-outputPath-
-
detect
public DetectionResponse detect(byte[] imageData)
目标检测- 参数:
imageData-- 返回:
-
detect
public DetectionResponse detect(BufferedImage image)
目标检测- 参数:
image-- 返回:
-
detectAndDraw
public BufferedImage detectAndDraw(BufferedImage sourceImage)
目标检测-将检测结果绘制到原图- 参数:
sourceImage-- 返回:
-
close
public void close()
显式释放资源(必须调用!)- 指定者:
close在接口中AutoCloseable
-
-