API
The API class is in charge of calling remo end-points. You shouldn’t need to look here, except if you want to implement new end-points.
class remo.api.API¶
documentation
class remo.api.API(server, email, password)
add_annotation¶
documentation
add_annotation(dataset_id, annotation_set_id, image_id, existing_annotations=None, classes=None, objects=None)
bulk_upload_files¶
documentation
bulk_upload_files(dataset_id, files_to_upload, annotation_task=None, folder_id=None, annotation_set_id=None, class_encoding=None, session_id: str = None)
chunks¶
documentation
chunks(my_list, chunk_size=2000)
complete_upload_session¶
documentation
complete_upload_session(session_id: str)
create_annotation_set¶
Creates a new empty annotation set :param - annotation_task: str.
name of the annotation task
documentation
create_annotation_set(annotation_task, dataset_id, name, classes=[])
-
Parameters
-
dataset_id (-) – int. the id of the dataset to create new annotation set
-
name (-) – str. Name of the annotation set to create.
-
classes (-) – list of str. list of classes. Example: [‘Cat’, ‘Dog’]
-
create_dataset¶
documentation
create_dataset(name)
create_new_upload_session¶
documentation
create_new_upload_session(dataset_id: int)
delete_dataset¶
Deletes dataset
documentation
delete_dataset(dataset_id: int)
-
Parameters
dataset_id – dataset id
export_annotations¶
Exports annotations in given format
documentation
export_annotations(annotation_set_id: int, annotation_format='json', export_coordinates='pixel', full_path=True, export_tags: bool = True)
-
Parameters
-
annotation_set_id – annotation set id
-
annotation_format – can be one of [‘json’, ‘coco’, ‘csv’]. Default: ‘json’
-
full_path – if True, appends file path to the filename. uses full image path. Default: True
-
export_coordinates – converts output values to percentage or pixels, can be one of [‘pixel’, ‘percent’]. Default: ‘pixel’
-
export_tags – if True, exports the tags to a separate CSV file. Default: True
-
-
Returns
annotation file content
get_annotation_info¶
documentation
get_annotation_info(dataset_id, annotation_set_id, image_id)
-
Parameters
-
dataset_id – dataset id
-
annotation_set_id – annotation set id
-
image_id – image id
-
Returns: annotations info
get_annotation_set¶
documentation
get_annotation_set(id)
get_dataset¶
documentation
get_dataset(id)
get_image¶
documentation
get_image(image_id)
get_image_content¶
documentation
get_image_content(url)
get_upload_session_status¶
documentation
get_upload_session_status(session_id: str)
list_annotation_set_classes¶
Lists annotation set classes
documentation
list_annotation_set_classes(annotation_set_id: int)
-
Parameters
annotation_set_id – int.
Returns: list of classes
list_annotation_sets¶
documentation
list_annotation_sets(dataset_id)
list_dataset_contents¶
documentation
list_dataset_contents(dataset_id, limit=None)
list_dataset_contents_by_folder¶
documentation
list_dataset_contents_by_folder(dataset_id, folder_id, limit=None)
list_dataset_images¶
documentation
list_dataset_images(dataset_id, limit=None, offset=None)
list_datasets¶
documentation
list_datasets()
search_images¶
Search images given a list of classes and tasks :param classes: string or list of strings - search for images which match all given classes :param task: string - annotation task :param dataset_id: int - performs search in given dataset otherwise in all datasets :param limit: int - limits search result
Returns: dictionary of image_id, dataset_id, name, preview, annotations, classes, dimensions
documentation
search_images(classes=None, task=None, dataset_id=None, limit=None)
split_files_by_size¶
documentation
split_files_by_size(files)
upload_file¶
documentation
upload_file(dataset_id, path, annotation_task=None, folder_id=None)
upload_files¶
documentation
upload_files(dataset_id, files_to_upload=[], annotation_task=None, folder_id=None, status=None, annotation_set_id=None, class_encoding=None, session_id: str = None)
upload_local_files¶
documentation
upload_local_files(dataset_id, local_files, annotation_task=None, folder_id=None, annotation_set_id=None, class_encoding=None, session_id: str = None)
upload_urls¶
documentation
upload_urls(dataset_id, urls, annotation_task=None, folder_id=None, annotation_set_id=None, class_encoding=None, session_id: str = None)
class remo.api.BaseAPI¶
documentation
class remo.api.BaseAPI(server, email, password)
delete¶
documentation
delete(\*args, \*\*kwargs)
get¶
documentation
get(\*args, \*\*kwargs)
post¶
documentation
post(\*args, \*\*kwargs)
public_url¶
documentation
public_url(endpoint, \*args, \*\*kwargs)
set_public_url¶
documentation
set_public_url(public_url: str)
url¶
documentation
url(endpoint, \*args, \*\*kwargs)
class remo.api.UploadStatus¶
documentation
class remo.api.UploadStatus(total_count)
progress¶
documentation
progress()
update¶
documentation
update(count)