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/{JOB_ID}
/
GET /v1/jobs/{JOB_ID}
/artifacts/
GET /v1/jobs/{JOB_ID}
/artifacts/{ARTIFACTS_ID}
/file/
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 , stopped , 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 below. |
media_type | string | Type of the processed media source (image , video , audio , videostream , pdf , xml ) |
ttl | integer | Time-to-live in seconds until the job will be deleted (optional, auto-deletion is disabled if field is not provided or the value is null ). |
result | dict | The actual result of the job. Contains two fields: detailed_link and summary. See below. This field is deprecated and is going to be removed in v2 of the API! |
webhook | dict | See Webhooks |
Child attributes of modules
The modules
field is a JSON object that defines which modules to use in the job.
Keys are module IDs of Visual Mining Modules while values are JSON objects that contain the module arguments.
The following module arguments are standard across all mining modules:
Name | Type | Description |
---|---|---|
model | string | Name of a Model that will be used for inference. |
dictionaries | list of Dictionary Specification objects | List of dictionaries to apply to the result. If a mining module does not support dictionaries, this field is ignored. |
range | Processing Range object | If provided, only the time / frame range specified by this argument will be processed in the source. |
Please note that other module arguments are specific to each Visual Mining Module that is being used.
Example
The following example shows the content of the modules
field specifying two modules and their arguments:
{
"modules": {
"face_recognition": {
"model": "celebrities"
},
"speech_recognition": {
"dictionaries": [
{
"id": "9538e44c-6f30-40b7-8d7c-73bda1d41a9e",
"mode": "fuzzy",
"threshold": 0.75
}
],
"range": {
"time_start": 5.0,
"time_end": 10.0
}
}
}
}
This job would apply Face Recognition with the celebrities
model and Speech Recognition with a single dictionary used for fuzzy matching.
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"
}
]
}
}