Sign inSign up

voduytuan/face-detector

By voduytuan

•Updated almost 11 years ago

Docker Image with Restful web service for face detection from an image

Image
1

420

voduytuan/face-detector repository overview

⁠face-detector

⁠Docker container running

You can start new container from this image or build your image from my Dockerfile. This image is already had a web server running in Apache, PHP and web services will start after start container.

docker run -ti -d --name facedetector -p 80:80 voduytuan/face-detector
⁠Request

Upload file with form-data field name image. Image must be JPG and size under 5MB. You can change this size in index.php file before building new docker image or mount volume with new index.php file.

There are two web services, count and face. With count web service, using your URL with ?action=count, this will return the number of face detected in uploaded image.

If not passing query string action, default web service is get all faces information (x, y, w, h).

⁠Sample response of Count service

Success:

{
	"success": true,
	"message": "",
	"count": 1
}

Error:

{
	"success": false,
	"message": "Image is required.",
	"count": 0
}
⁠Sample response of Face service

Success:

{
	"success": true,
	"message": "",
	"faces": [
		{"x":985,"y":482,"w":303,"h":303}
	]
}

Error:

{
	"success": false,
	"message": "Image must be in JPG format.",
	"faces": []
}

--End--

Tag summary

Content type

Image

Digest

sha256:ae64fe885…

Size

706.5 MB

Last updated

almost 11 years ago

docker pull voduytuan/face-detector:1.0