mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
These changes allow to configure the computer vision models through an optional vision.yml configuration file. Note that the API endpoints are not yet functional and require further work. Signed-off-by: Michael Mayer <michael@photoprism.app>
28 lines
667 B
Go
28 lines
667 B
Go
package api
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/photoprism/photoprism/internal/auth/acl"
|
|
)
|
|
|
|
// PostVisionFaces returns the positions and embeddings of detected faces.
|
|
//
|
|
// @Summary returns the positions and embeddings of detected faces
|
|
// @Id PostVisionFaces
|
|
// @Tags Vision
|
|
// @Produce json
|
|
// @Failure 401,403,429,501 {object} i18n.Response
|
|
// @Router /api/v1/vision/faces [post]
|
|
func PostVisionFaces(router *gin.RouterGroup) {
|
|
router.POST("/vision/faces", func(c *gin.Context) {
|
|
s := Auth(c, acl.ResourceVision, acl.AccessAll)
|
|
|
|
// Abort if permission is not granted.
|
|
if s.Abort(c) {
|
|
return
|
|
}
|
|
|
|
AbortNotImplemented(c)
|
|
})
|
|
}
|