A web application to extract face and object annotations from videos using computer vision algorithms for face/object detection/recognition
On a GNU/Linux Debian Stretch machine install
- python 2.7
- docker
- docker-compose
Clone git repository on your machine. On a console run:
git clone https://github.com/fedjo/orca.git
Move into directory 'aat' and build docker images
cd aat
./docker/build.sh dev
Then run containers using docker-compose
docker-compose up -d
- Python 2.7 - The language used
- Django 1.10 - Python Web framework
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details
Upload a zip file containing the faces you want to find on videos.
URL
/model
Method:
POSTData Params
model=[path of the zipfile]
Success Response:
- Code: 200
Content:{ "people" : [ "Obama", "Trump" ] }
- Code: 200
Sample Call:
$.ajax({url: "/model",dataType: "json",type : "POST",data: newBinaryData('/path/to/file')success : function(r){console.log(r);}});
List all face databases that the recognizer has been trained with.
URL
/model
Method:
GETSuccess Response:
- Code: 200
Content:[ "actors.yml", "students.yml"" ]
- Code: 200
Sample Call:
$.ajax({url: "/model",dataType: "json",type : "GET",success : function(r){console.log(r);}});
Call the annotation process to generate automatic annotations.
URL
/annotate
Method:
POSTData Params
{ "content": {"path": "/thesis_video/I148276[HD-VI].mp4"}, "cascade": { "name": [1], "scale": "1.3", "neighbors": "5", "minx" : "25", "miny":"25", "framerate": 1 }, "bounding_boxes": "True", "objdetector": {"framerate": 50}, "transcription": {"input_language": "it", "output_language": "en"} }Success Response:
- Code: 200
Content:{ "transcription": { "url: /static/I148276[HD-VI].srt" }, "facedetection": { "457.0": [ { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, "face": "Obama" "probability": 0.56 }, { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, "face": "Obama" "probability": 0.56 } ], "601.0": [ { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, }, { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, } ], }, "objectdetection": { "457.0": [ { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, "class": "person" "probability": 0.56 }, { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, "class": "dog" "probability": 0.56 } ], ""601.0"": [ { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, }, { "position": { "xaxis": 982, "yaxis": 181 }, "dimensions": { "width": 398, "height": 398 }, } ], } }
- Code: 200
Error Response:
- Code: 400 BAD REQUEST
Content:{ error : "Bad JSON structure" }
OR
- Code: 400 BAD REQUEST
Content:{ error : "Input JSON is not appropriate" }
- Code: 400 BAD REQUEST
Sample Call:
$.ajax({url: "/annotate",dataType: "json",type : "POST",data: jsondatasuccess : function(r){console.log(r);}});