package cn.hmsoft.ai.face;

import java.io.File;

import cn.hmsoft.ai.util.AiParamUtil;

/******************
 * ai 按照片查找人
 *
 */
public abstract class FaceSearch {
	private static FaceSearch ai = null;

	public static FaceSearch instance() {
		if (ai == null) {
			synchronized (FaceSearch.class) {
				try {
					ai = (FaceSearch) Class.forName(AiParamUtil.PhotoSearchAIClass).newInstance();
				} catch (Exception e) {
					try {
						ai = FaceSearch.class.newInstance();
					} catch (Exception ex) {

					}
				}
			}
		}
		return ai;
	}

	/**
	 * 根据照片查找用户信息
	 * @param photoImage
	 * @param groupIds
	 * @return 用户信息（身份证号）
	 */
	public abstract String searchFace(File file, String groupIds);
}
