Object Recognition

Object Recognition detects, locates, and recognizes individual objects in an image file. Zia Object Recognition can identify 80 different kinds of objects from images.

You can learn more from the Object Recognition help page.

You can provide a .jpg/.jpeg or .png file as the input. Refer to the API documentation for the request and response formats.

The detectObject() method is used detect and identify the objects in the image. It returns the coordinates of each object, their type, and the confidence score of each recognition.

Ensure the following packages are imported:

Copiedimport com.zc.component.ml.ZCML;
import com.zc.component.ml.ZCObjectDetectionData;
import com.zc.component.ml.ZCObjectPoints;
CopiedFile file = new File("{filePath}"); //Specify the file location
List<ZCObjectDetectionData> objects = ZCML.getInstance().detectObjects(file); //To detect the objects in the image
for(ZCObjectDetectionData object : objects){    
	String objectType = object.getObjectType(); //To get the object type
	Double objConfidence = object.getConfidence(); //To get the confidence score of the recognition
	ZCObjectPoints objCoordinates = object.getObjectPoints(); //To get the coordinates of the object in the image
}