1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 22:33:17 +00:00

face_cluster (#6470)

* face_cluster

* update

* update

* feat: update ui

* feat: optimize code

* feat: update code

* feat: optimize ui

* feat: optimize view name

---------

Co-authored-by: zheng.shen <zheng.shen@seafile.com>
Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
shenzheng-1
2024-10-16 11:09:30 +08:00
committed by GitHub
parent 24405a6600
commit 065f1584b5
24 changed files with 872 additions and 31 deletions

View File

@@ -247,6 +247,32 @@ class MetadataManagerAPI {
};
return this.req.delete(url, { data });
}
// face recognition
getFaceRecognitionStatus(repoID) {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/face-recognition/';
return this.req.get(url);
}
openFaceRecognition = (repoID) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/face-recognition/';
return this.req.post(url);
};
getFaceData = (repoID, start = 0, limit = 1000) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/face-records/?start=' + start + '&limit=' + limit;
return this.req.get(url);
};
updateFaceName = (repoID, recordID, name) => {
const url = this.server + '/api/v2.1/repos/' + repoID + '/metadata/face-record/';
const params = {
record_id: recordID,
name: name,
};
return this.req.put(url, params);
};
}
const metadataAPI = new MetadataManagerAPI();