Screengrabs
Enable this model configuration to capture keyframes and slides from a visual meeting/conversation.

Overview

Built as a video-first platform, Marsview is the only company in this category that captures keyframes and slides from videos and screen sharing from an online web conference.

modelTypeConfiguration

Keys
Value
modelType
screengrabs
modelConfig
Model Configuration object for screengrabs

modelConfig parameters

modelConfig
Description
Defaults
ocr.enable
Boolean to enable or disable OCR
False
screen_activity.enable
Filter the screengrabs based on the given classes. If this is set to true, then the screengrabs captured by the model will be filtered based on them
True
screen_activity.classes
A list of classes that the model can recognize. By default all the classes are given. Select the classes that best suit the type of input video. Eg: For meeting, set the class list with values ppt and speaker_presentation
['drawing', 'ppt', 'screen', 'speaker_face', 'speaker_presentation']

Example Request

Curl
Python
1
curl --location --request POST 'https://api.marsview.ai/cb/v1/conversation/save_file_link/{{user ID}' \
2
--header 'Content-Type: application/json' \
3
--header 'authorization: {{Replace with your authentication token' \
4
--data-raw '{
5
"userId":"{{Insert User ID}}",
6
"txnId": "{{Insert txn ID}}",
7
"enableModels":[
8
{
9
"modelType":"screengrabs",
10
"modelConfig":{
11
"ocr":{
12
"enable":true
13
},
14
"screen_activity" : {
15
"enable" : true,
16
"classes" : ["drawing","ppt","screen","speaker_face","speaker_presentation"]
17
}
18
19
}
20
}
21
]
22
}'
Copied!
1
import requests
2
user_id = "[email protected]"
3
auth_token = "replace this with your auth token"
4
txn_id = "Replace this with your txn id"
5
request_url = "https://api.marsview.ai/cb/v1/conversation/{user_id}/compute"
6
7
8
def get_screen_grabs():
9
payload={
10
"userId":user_id,
11
"txnId": txn_id,
12
"enableModels":[
13
{
14
"modelType":"screengrabs",
15
"modelConfig":{
16
"ocr":{
17
"enable":true
18
},
19
"screen_activity" : {
20
"enable" : true,
21
"classes" : ['drawing', 'ppt', 'screen',
22
'speaker_face', 'speaker_presentation']
23
}
24
}
25
},
26
]
27
}
28
headers = {'authorization': '{}'.format(auth_token)}
29
30
response = requests.request("POST", request_url.format(user_id=user_id), headers=headers, json=payload)
31
print(response.text)
32
if response.status_code == 200 and response.json()["status"] == "true":
33
return response.json()["data"]["enableModels"]["state"]["status"]
34
else:
35
raise Exception("Custom exception")
36
37
if __name__ == "__main__":
38
get_screen_grabs()
Copied!

Example Response

1
"data": {
2
"screengrabs": [
3
{
4
"shotId": null,
5
"timeStamp": 13466.666666666666,
6
"frameNumber": 202,
7
"meetingActivivty": null,
8
"title": [],
9
"text": [],
10
"confidenceTitle": [],
11
"confidenceText": [],
12
"bboxTitle": [],
13
"bboxText": []
14
},
15
]
16
}
Copied!

Response Object

Field
Description
screenGrabs
List of Screengrab Objects
shotId
Id of the collection of frames being analyzed
timeStamp
Start time of the shotId in milliseconds
frameNumber
Frame number of the frame being analyzed
meetingActivity
Object specifying the meeting activity, returns null if there is not meeting activity
title
List of String
text
List of text identified in the given time frame
confidenceTitle
List of confidence titles
confindenceText
List of confidence text
bboxTitle
Gives a list of 4 parameters with index 0 = X-displacement, 1=Y-displacement, 2=X-end co-ordinate, 3=Y end co-ordinate which represents the coordniates of bounding boxes for the titles identified by the model in the given frame.
bboxText
Gives a list of 4 parameters with index 0 = X-displacement, 1=Y-displacement, 2=X-end co-ordinate, 3=Y end co-ordinate which represents the coordniates of bounding boxes for the text areas identified by the model in the given frame.
Last modified 3mo ago