$path = 'path/to/some.jpg';
$res = $ai->faceset()->path($path)->add();
if($res->success()){
var_dump(res->toArray());
}
// 删除人脸时 需要先获取个体人脸列表 获取到face_ids 然后调用删除人脸即可删除
$path = 'path/to/some.jpg';
$res = $ai->faceset()->path($path)->delete([
'person_id' => 'person0',
'face_ids' => '2214731677930908309'
]);
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->faceset()->delete([
'face_id' => '2214731677930908309'
]);
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->facesetGroup()->get();
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->facesetGroup()->users([
'group_id' => 'group0'
]);
if($res->success()){
var_dump(res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->facesetUser()->path($path)->add([
'group_ids' => 'group0',
'person_id' => 'person0',
'person_name' => 'crisen'
]);
if($res->success()){
var_dump(res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->facesetUser()->get([
'person_id' => 'person0'
]);
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->facesetUser()->update([
'person_id' => 'person0',
'person_name' => 'crisen',
'tag' => 'a coder'
]);
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->facesetUser()->delete([
'person_id' => 'person0',
]);
if($res->success()){
var_dump(res->toArray());
}
$res = $ai->facesetUser()->faces([
'person_id' => 'person0',
]);
if($res->success()){
var_dump(res->toArray());
}
$path = 'path/to/some.jpg';
$res = $ai->face()->path($path)->search([
'group_id' => 'person0',
'topn' => 5
]);
if($res->success()){
var_dump(res->toArray());
}