All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.gdface.sdk.thrift.client.FaceApi Maven / Gradle / Ivy

The newest version!
package net.gdface.sdk.thrift.client;

import com.facebook.swift.codec.*;
import com.facebook.swift.codec.ThriftField.Requiredness;
import com.facebook.swift.service.*;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.*;
import java.util.*;

@ThriftService("FaceApi")
public interface FaceApi
{
    @ThriftService("FaceApi")
    public interface Async
    {
        @ThriftMethod(value = "compare2Face",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture compare2Face(
            @ThriftField(value=1, name="imgData1", requiredness=Requiredness.OPTIONAL) final byte [] imgData1,
            @ThriftField(value=2, name="facePos1", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos1,
            @ThriftField(value=3, name="imgData2", requiredness=Requiredness.OPTIONAL) final byte [] imgData2,
            @ThriftField(value=4, name="facePos2", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos2
        );

        @ThriftMethod(value = "compareCode",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture compareCode(
            @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
            @ThriftField(value=2, name="code2", requiredness=Requiredness.OPTIONAL) final byte [] code2
        );

        @ThriftMethod(value = "compareCodes",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> compareCodes(
            @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
            @ThriftField(value=2, name="codes", requiredness=Requiredness.OPTIONAL) final List codes
        );

        @ThriftMethod(value = "compareFaces",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture compareFaces(
            @ThriftField(value=1, name="code", requiredness=Requiredness.OPTIONAL) final byte [] code,
            @ThriftField(value=2, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=3, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
        );

        @ThriftMethod(value = "compareFeatures",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> compareFeatures(
            @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
            @ThriftField(value=2, name="codes", requiredness=Requiredness.OPTIONAL) final List codes
        );

        @ThriftMethod(value = "detectAndCompare2Face",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture detectAndCompare2Face(
            @ThriftField(value=1, name="imgData1", requiredness=Requiredness.OPTIONAL) final byte [] imgData1,
            @ThriftField(value=2, name="detectRect1", requiredness=Requiredness.OPTIONAL) final FRect detectRect1,
            @ThriftField(value=3, name="imgData2", requiredness=Requiredness.OPTIONAL) final byte [] imgData2,
            @ThriftField(value=4, name="detectRect2", requiredness=Requiredness.OPTIONAL) final FRect detectRect2
        );

        @ThriftMethod(value = "detectAndGetCodeInfo",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture> detectAndGetCodeInfo(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
        );

        @ThriftMethod(value = "detectCenterFace",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture detectCenterFace(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
        );

        @ThriftMethod(value = "detectFace",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> detectFace(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
        );

        @ThriftMethod(value = "detectFaceWithOptions",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> detectFaceWithOptions(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="jsonOptions", requiredness=Requiredness.OPTIONAL) final String jsonOptions
        );

        @ThriftMethod(value = "detectMaxFace",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture detectMaxFace(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
        );

        @ThriftMethod(value = "detectMaxFaceAndGetCodeInfo",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture detectMaxFaceAndGetCodeInfo(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
        );

        @ThriftMethod(value = "getCodeInfo",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> getCodeInfo(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum,
            @ThriftField(value=3, name="facePos", requiredness=Requiredness.OPTIONAL) final List facePos
        );

        @ThriftMethod(value = "getCodeInfoSingle",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture getCodeInfoSingle(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos
        );

        @ThriftMethod(value = "getFeature",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture getFeature(
            @ThriftField(value=1, name="faces", requiredness=Requiredness.OPTIONAL) final Map faces
        );

        @ThriftMethod(value = "hasFace",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture hasFace(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
        );

        @ThriftMethod(value = "isLocal",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture isLocal();

        @ThriftMethod(value = "matDetectAndGetCodeInfo",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> matDetectAndGetCodeInfo(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
        );

        @ThriftMethod(value = "matDetectAndGetCodeInfoUnchecked",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> matDetectAndGetCodeInfoUnchecked(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
        );

        @ThriftMethod(value = "matDetectFace",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> matDetectFace(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
        );

        @ThriftMethod(value = "matDetectFaceFacenum",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> matDetectFaceFacenum(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="facenum", requiredness=Requiredness.REQUIRED) final int facenum
        );

        @ThriftMethod(value = "matDetectMaxFace",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture matDetectMaxFace(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
        );

        @ThriftMethod(value = "matDetectMaxFaceAndGetCodeInfo",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture matDetectMaxFaceAndGetCodeInfo(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
        );

        @ThriftMethod(value = "matGetCodeInfo",
                      exception = {
                          @ThriftException(type=NotFaceDetectedException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture> matGetCodeInfo(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="facenum", requiredness=Requiredness.REQUIRED) final int facenum,
            @ThriftField(value=6, name="facePos", requiredness=Requiredness.OPTIONAL) final List facePos
        );

        @ThriftMethod(value = "matGetCodeInfoSingle",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture matGetCodeInfoSingle(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos
        );

        @ThriftMethod(value = "matHasFace",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture matHasFace(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
        );

        @ThriftMethod(value = "matSearchFaces",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture> matSearchFaces(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos,
            @ThriftField(value=6, name="similarty", requiredness=Requiredness.REQUIRED) final double similarty,
            @ThriftField(value=7, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
            @ThriftField(value=8, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
            @ThriftField(value=9, name="group", requiredness=Requiredness.REQUIRED) final int group
        );

        @ThriftMethod(value = "matWearMask",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture matWearMask(
            @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
            @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
            @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
            @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
            @ThriftField(value=5, name="faceInfo", requiredness=Requiredness.OPTIONAL) final CodeInfo faceInfo
        );

        @ThriftMethod(value = "sdkCapacity",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> sdkCapacity();

        @ThriftMethod(value = "searchFaces",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=NotFaceDetectedException.class, id=2),
                          @ThriftException(type=ServiceRuntimeException.class, id=3)
                      })
        ListenableFuture> searchFaces(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos,
            @ThriftField(value=3, name="similarty", requiredness=Requiredness.REQUIRED) final double similarty,
            @ThriftField(value=4, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
            @ThriftField(value=5, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
            @ThriftField(value=6, name="group", requiredness=Requiredness.REQUIRED) final int group
        );

        @ThriftMethod(value = "searchFeatures",
                      exception = {
                          @ThriftException(type=ServiceRuntimeException.class, id=1)
                      })
        ListenableFuture> searchFeatures(
            @ThriftField(value=1, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature,
            @ThriftField(value=2, name="similarity", requiredness=Requiredness.REQUIRED) final double similarity,
            @ThriftField(value=3, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
            @ThriftField(value=4, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
            @ThriftField(value=5, name="group", requiredness=Requiredness.REQUIRED) final int group
        );

        @ThriftMethod(value = "wearMask",
                      exception = {
                          @ThriftException(type=ImageErrorException.class, id=1),
                          @ThriftException(type=ServiceRuntimeException.class, id=2)
                      })
        ListenableFuture wearMask(
            @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
            @ThriftField(value=2, name="faceInfo", requiredness=Requiredness.OPTIONAL) final CodeInfo faceInfo
        );
    }
    @ThriftMethod(value = "compare2Face",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    double compare2Face(
        @ThriftField(value=1, name="imgData1", requiredness=Requiredness.OPTIONAL) final byte [] imgData1,
        @ThriftField(value=2, name="facePos1", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos1,
        @ThriftField(value=3, name="imgData2", requiredness=Requiredness.OPTIONAL) final byte [] imgData2,
        @ThriftField(value=4, name="facePos2", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos2
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "compareCode",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    double compareCode(
        @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
        @ThriftField(value=2, name="code2", requiredness=Requiredness.OPTIONAL) final byte [] code2
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "compareCodes",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    List compareCodes(
        @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
        @ThriftField(value=2, name="codes", requiredness=Requiredness.OPTIONAL) final List codes
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "compareFaces",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    CompareResult compareFaces(
        @ThriftField(value=1, name="code", requiredness=Requiredness.OPTIONAL) final byte [] code,
        @ThriftField(value=2, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=3, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "compareFeatures",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    List compareFeatures(
        @ThriftField(value=1, name="code1", requiredness=Requiredness.OPTIONAL) final byte [] code1,
        @ThriftField(value=2, name="codes", requiredness=Requiredness.OPTIONAL) final List codes
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "detectAndCompare2Face",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    double detectAndCompare2Face(
        @ThriftField(value=1, name="imgData1", requiredness=Requiredness.OPTIONAL) final byte [] imgData1,
        @ThriftField(value=2, name="detectRect1", requiredness=Requiredness.OPTIONAL) final FRect detectRect1,
        @ThriftField(value=3, name="imgData2", requiredness=Requiredness.OPTIONAL) final byte [] imgData2,
        @ThriftField(value=4, name="detectRect2", requiredness=Requiredness.OPTIONAL) final FRect detectRect2
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "detectAndGetCodeInfo",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    List detectAndGetCodeInfo(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "detectCenterFace",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    CodeInfo detectCenterFace(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "detectFace",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List detectFace(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
    ) throws ImageErrorException, ServiceRuntimeException;

    @ThriftMethod(value = "detectFaceWithOptions",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List detectFaceWithOptions(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="jsonOptions", requiredness=Requiredness.OPTIONAL) final String jsonOptions
    ) throws ImageErrorException, ServiceRuntimeException;

    @ThriftMethod(value = "detectMaxFace",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    CodeInfo detectMaxFace(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "detectMaxFaceAndGetCodeInfo",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    CodeInfo detectMaxFaceAndGetCodeInfo(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "getCodeInfo",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List getCodeInfo(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum,
        @ThriftField(value=3, name="facePos", requiredness=Requiredness.OPTIONAL) final List facePos
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "getCodeInfoSingle",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    CodeInfo getCodeInfoSingle(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "getFeature",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    byte [] getFeature(
        @ThriftField(value=1, name="faces", requiredness=Requiredness.OPTIONAL) final Map faces
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "hasFace",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    boolean hasFace(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData
    ) throws ImageErrorException, ServiceRuntimeException;

    @ThriftMethod(value = "isLocal",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    boolean isLocal() throws ServiceRuntimeException;

    @ThriftMethod(value = "matDetectAndGetCodeInfo",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List matDetectAndGetCodeInfo(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="faceNum", requiredness=Requiredness.REQUIRED) final int faceNum
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matDetectAndGetCodeInfoUnchecked",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    List matDetectAndGetCodeInfoUnchecked(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "matDetectFace",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    List matDetectFace(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "matDetectFaceFacenum",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List matDetectFaceFacenum(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="facenum", requiredness=Requiredness.REQUIRED) final int facenum
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matDetectMaxFace",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    CodeInfo matDetectMaxFace(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matDetectMaxFaceAndGetCodeInfo",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    CodeInfo matDetectMaxFaceAndGetCodeInfo(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matGetCodeInfo",
                  exception = {
                      @ThriftException(type=NotFaceDetectedException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    List matGetCodeInfo(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="facenum", requiredness=Requiredness.REQUIRED) final int facenum,
        @ThriftField(value=6, name="facePos", requiredness=Requiredness.OPTIONAL) final List facePos
    ) throws NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matGetCodeInfoSingle",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    CodeInfo matGetCodeInfoSingle(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "matHasFace",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    boolean matHasFace(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "matSearchFaces",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    List matSearchFaces(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos,
        @ThriftField(value=6, name="similarty", requiredness=Requiredness.REQUIRED) final double similarty,
        @ThriftField(value=7, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
        @ThriftField(value=8, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
        @ThriftField(value=9, name="group", requiredness=Requiredness.REQUIRED) final int group
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "matWearMask",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    boolean matWearMask(
        @ThriftField(value=1, name="matType", requiredness=Requiredness.OPTIONAL) final MatType matType,
        @ThriftField(value=2, name="matData", requiredness=Requiredness.OPTIONAL) final byte [] matData,
        @ThriftField(value=3, name="width", requiredness=Requiredness.REQUIRED) final int width,
        @ThriftField(value=4, name="height", requiredness=Requiredness.REQUIRED) final int height,
        @ThriftField(value=5, name="faceInfo", requiredness=Requiredness.OPTIONAL) final CodeInfo faceInfo
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "sdkCapacity",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    Map sdkCapacity() throws ServiceRuntimeException;

    @ThriftMethod(value = "searchFaces",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=NotFaceDetectedException.class, id=2),
                      @ThriftException(type=ServiceRuntimeException.class, id=3)
                  })
    List searchFaces(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="facePos", requiredness=Requiredness.OPTIONAL) final CodeInfo facePos,
        @ThriftField(value=3, name="similarty", requiredness=Requiredness.REQUIRED) final double similarty,
        @ThriftField(value=4, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
        @ThriftField(value=5, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
        @ThriftField(value=6, name="group", requiredness=Requiredness.REQUIRED) final int group
    ) throws ImageErrorException, NotFaceDetectedException, ServiceRuntimeException;

    @ThriftMethod(value = "searchFeatures",
                  exception = {
                      @ThriftException(type=ServiceRuntimeException.class, id=1)
                  })
    List searchFeatures(
        @ThriftField(value=1, name="feature", requiredness=Requiredness.OPTIONAL) final byte [] feature,
        @ThriftField(value=2, name="similarity", requiredness=Requiredness.REQUIRED) final double similarity,
        @ThriftField(value=3, name="rows", requiredness=Requiredness.REQUIRED) final int rows,
        @ThriftField(value=4, name="imgMD5Set", requiredness=Requiredness.OPTIONAL) final List imgMD5Set,
        @ThriftField(value=5, name="group", requiredness=Requiredness.REQUIRED) final int group
    ) throws ServiceRuntimeException;

    @ThriftMethod(value = "wearMask",
                  exception = {
                      @ThriftException(type=ImageErrorException.class, id=1),
                      @ThriftException(type=ServiceRuntimeException.class, id=2)
                  })
    boolean wearMask(
        @ThriftField(value=1, name="imgData", requiredness=Requiredness.OPTIONAL) final byte [] imgData,
        @ThriftField(value=2, name="faceInfo", requiredness=Requiredness.OPTIONAL) final CodeInfo faceInfo
    ) throws ImageErrorException, ServiceRuntimeException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy