Skip to content

Job Resource

Definition

This is an object representing your Visual Mining Job. You can create it to define a job that is beeing processed by DeepVA.

You can retrieve it to see the state and the results of the job.

ENDPOINTS

GET /v1/jobs/

GET /v1/jobs/{JOB_ID}/

POST /v1/jobs/

DELETE /v1/jobs/

Attributes

Top level attributes

Name Type Description
id string Global identifier to access the actual resource
tag string Custom identifier for the job (e.g. your custom media file ID)
state string Current state of the job ("waiting", "processing", "completed", "failed")
errors list of strings A list of errors that happened during processing the job
progress number The current progress of the job (0.0 - 1.0)
duration number The total or current duration of the job in seconds
time_created string Creation time of the job (ISO Time String)
time_started string Starting time of the job (ISO Time String)
time_completed string Completion time of the job (ISO Time String)
sources list of strings A list of sources (public URLs, DeepVA Storage URLs or Youtube and Vimeo URLs)
modules dict The definition of the modules that are applied on the sources. See "Child attributes of modules"
result dict The actual result of the job. Contains two fields: detailed_link and summary. See "Child attributes of result"
webhook dict See Webhooks

Child attributes of modules

The modules field is a JSON dictionary object to define which modules to use in the job.

The Visal Mining Module is defined as key (the module ID is used). The value is a JSON dictionary object holding the module parameters.

The following example shows the content of the modules field specifying two modules and their parameters:

{
  "modules": {
      "face_recognition": {
        "model": "celebrities"
      },
      "object_scene_recognition": {
        "model": "general"
      }
  }
}

This job would apply Face Recognition with the celebrities model and Object & Scene Recognition with the general model.

Child attributes of result

Name Type Description
detailed_link string Pointing to the /detailed-result endpoint to fetch detailed results of the job
summary List of ResultSummary objects The actual result as a summary of the Job. See the reference of the ResultSummary object.

JSON Example

The following JSON snippet is showing a completed job which was processing an image with the Face Recognition module.

{
  "id": "6b5195d6-cc05-4a99-a293-8d73be0aa37f",
  "tag": "",
  "state": "completed",
  "progress": 1.0,
  "duration": 0.2,
  "time_created": "2019-08-12 08:14:28.430144",
  "time_started": "2019-08-12 08:14:29.510771",
  "time_completed": "2019-08-12 08:14:29.530825",
  "sources": [
      "https://demo.deepva.com/assets/image1.jpg"
  ],
  "modules": {
      "face_recognition": {
        "model": "celebrities"
      }
  },
  "result": {
      "detailed_link": "https://api.deepva.com/v1/jobs/6b5195d6-cc05-4a99-a293-8d73be0aa37f/detailed-results",
      "summary": [
        {
            "source": "https://demo.deepva.com/assets/image1.jpg",
            "media_type": "image",
            "info": {},
            "items": [
                {
                    "type": "face",
                    "label": "Frederik Böhm",
                    "module": "face_recognition"
                }
            ]
        }
      ]
}

Here is another example showing the job for a video.

{
  "id": "863fae26-6a25-4234-9c16-6dad1b957ae6",
  "tag": "",
  "progress": 1,
  "duration": 92.262,
  "state": "completed",
  "time_completed": "7/24/2020, 10:36:46 AM",
  "time_created": "2020-07-24 10:35:13.564000",
  "time_started": "7/24/2020, 10:35:13 AM",
  "sources": [
    "storage://Fad9kJ0jSI3swC6N5hVp"
  ],
  "modules": {
    "lower_third_recognition": {
      "state": "completed"
    },
    "face_recognition": {
      "model": "celebrities",
      "state": "completed"
    },
    "object_scene_recognition": {
      "model": "general",
      "language": 0,
      "state": "completed"
    }
  },
  "result": {
    "detailed_link": "http://api.deepva.com/api/v1/jobs/863fae26-6a25-4234-9c16-6dad1b957ae6/detailed-results",
    "summary": [
      {
        "source": "storage://Fad9kJ0jSI3swC6N5hVp",
        "media_type": "video",
        "info": {
          "fps": 25,
          "resolution": [
            960,
            540
          ],
          "total_frames": 3636,
          "duration": 145.44
        },
        "items": [
          {
            "type": "lower_third",
            "label": "Julian Schuster",
            "module": "lower_third_recognition"
          },
          {
            "type": "lower_third",
            "label": "Fritz Keller",
            "module": "lower_third_recognition"
          },
          {
            "type": "face",
            "label": "Vincenzo Grifo",
            "module": "face_recognition"
          },
          {
            "type": "face",
            "label": "Nicolas Höfler",
            "module": "face_recognition"
          },
          {
            "type": "face",
            "label": "Julian Schuster",
            "module": "face_recognition"
          },
          {
            "type": "face",
            "label": "Alexander Schwolow",
            "module": "face_recognition"
          },
          {
            "type": "face",
            "label": "Christian Streich",
            "module": "face_recognition"
          },
          {
            "type": "object",
            "label": "Person",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Indoor",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Outdoor",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Face",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Field",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Clothing",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Accessories",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Mammal",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Animal",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Cattle",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Cow",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Overcoat",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Coat",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Suit",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Tie",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Glasses",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Crowd",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Sunglasses",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Grassland",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "People",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Team Sport",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Sport",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Football",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Team",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Hat",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Dog",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Pet",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Canine",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Nature",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Pasture",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Meadow",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Rural",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Countryside",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Farm",
            "module": "object_scene_recognition"
          },
          {
            "type": "object",
            "label": "Soccer",
            "module": "object_scene_recognition"
          }
        ]
  }
}