//写入自己的appid,apikey,secretkey AipFace client = new AipFace(appid,apikey,secretkey); // 图片Base64转码,src图片所在路径 byte[] bytes = Files.readAllBytes(Paths.get(src)); String encode = Base64Util.encode(bytes); // 传入可选参数调用接口 HashMap<String, String> options = new HashMap<String, String>(); options.put("quality_control", "LOW"); options.put("liveness_control", "NORMAL"); options.put("action_type", "REPLACE"); options.put("user_info", "user"); //上传到百度云人脸库 JSONObject res = client.addUser(encode, "BASE64", "groupId", "userId", options);
百度智能云--人脸注册
最新推荐文章于 2024-08-01 15:05:06 发布