An asset contains an image, meta information like validated or in_validation_set and optional a set op annotations (eg points and bounding boxes)
source
Asset
Asset (deleted:str, id:int, in_validation_set:bool, liked:bool, meta:str,
original_category:str, path:str, project_id:int, unclear:bool,
validated:bool, annotations:Optional[List[box21_api.annotation.Box
21Annotation]]=None)
Create a new asset, including the following parameters.
deleted |
str |
|
deleted |
id |
int |
|
id |
in_validation_set |
bool |
|
whether the asset is in the validation set |
liked |
bool |
|
whether the asset is liked in Box21 |
meta |
str |
|
json dict with key value pairs |
original_category |
str |
|
optional category |
path |
str |
|
box21 asset path |
project_id |
int |
|
box21 asset project_id |
unclear |
bool |
|
whether the asset is marked as unclear |
validated |
bool |
|
whether the asset is marked as validated |
annotations |
Optional |
None |
|
json_dict : Dict[str, Any] = {'deleted': None, 'filename': '768a1300-79f1-4261-b7cc-0ff44669008b_bricks_oblique_4_10.jpg', 'id': 21, 'in_validation_set': False, 'liked': False, 'meta': '{"filename": "768a1300-79f1-4261-b7cc-0ff44669008b_bricks_oblique_4_10.jpg", "import": "true", "description": "Movies"}', 'original_category': '', 'path': '768a1300-79f1-4261-b7cc-0ff44669008b_bricks_oblique_4_10.jpg', 'project_id': 3, 'unclear': False, 'validated': 'true'}
asset = Asset.from_json(json_dict)
print(asset.id)