GithubHelp home page GithubHelp logo

image-video-analyzer-api's Introduction

Video frames analyzer API

How to use:

Setup and run

Clone this repository with git clone [email protected]:CAPGAGA/image-video-analyzer-API.git

Setup with docker compose via docker-compose up -d

After that, you can access API via localhost/docs or 127.0.0.1/docs depending on your local DNS setup

API endpoints and what they do

To submit your video for analysis use POST request to the /analysis endpoint with fields media file in request body

example:

curl -X 'POST' \
  'http://127.0.0.1:8000/analysis/' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'media=@855538-hd_1920_1080_25fps.mp4;type=video/mp4'

example of successful respond:

{"requestId": 18}

requestId is an id of submitted file, which can be used to analysis data about of each frame of the video as shown in next example

To get information of each frame use GET request with reuqestId in URL as shown:

example:

curl -X 'GET' \
  'http://127.0.0.1:8000/analysis/18/' \
  -H 'accept: application/json'

example of successful respond:

[
  {
    "file_id": 18,
    "result": "African elephant, Loxodonta africana",
    "id": 1,
    "created": null
  },
  {
    "file_id": 18,
    "result": "African elephant, Loxodonta africana",
    "id": 2,
    "created": null
  },
  {
    "file_id": 18,
    "result": "African elephant, Loxodonta africana",
    "id": 3,
    "created": null
  },
  ...
]

Keep in mind that analysis is done in background, so results might not be accessible right away!

To delete analysis results send DELETE request with requestId in URL as shown:

example:

curl -X 'DELETE' \
  'http://127.0.0.1:8000/analysis/18/' \
  -H 'accept: application/json'

there will be no response here if all is successful

image-video-analyzer-api's People

Contributors

capgaga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.