001package javax.visrec.ml.detection; 002 003import javax.visrec.ml.ClassificationException; 004import javax.visrec.util.BoundingBox; 005import java.util.List; 006import java.util.Map; 007 008/** 009 * Interface to perform object detection in image. 010 * Returns a map of object labels/classes and corresponding location in image outlined by BoundingBox-es 011 * 012 * @author Zoran Sevarac 013 * @param <T> Class used to represent image that will be analyzed 014 * @since 1.0 015 */ 016@FunctionalInterface 017public interface ObjectDetector<T> { 018 019 /** 020 * Detects object in specified image 021 * 022 * @param image image to search for object 023 * @return a map of multiple {@link BoundingBox} 024 */ 025 Map<String, List<BoundingBox>> detectObject(T image) throws ClassificationException; 026 027}