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)

chunks

documentation
chunks(my_list, chunk_size=2000)

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)

export_annotations

Exports annotations in given format

documentation
export_annotations(annotation_set_id: int, annotation_format='json', export_coordinates='pixel', full_path='true')
  • Parameters

    • annotation_set_id – annotation set id

    • annotation_format – can be one of [‘json’, ‘coco’, ‘csv’], default=’json’

    • full_path – uses full image path (e.g. local path), can be one of [‘true’, ‘false’], default=’false’

    • export_coordinates – converts output values to percentage or pixels, can be one of [‘pixel’, ‘percent’], default=’pixel’

  • 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)

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)

upload_local_files

documentation
upload_local_files(dataset_id, local_files, annotation_task=None, folder_id=None, annotation_set_id=None, class_encoding=None)

upload_urls

documentation
upload_urls(dataset_id, urls, annotation_task=None, folder_id=None, annotation_set_id=None, class_encoding=None)

class remo.api.BaseAPI

documentation
class remo.api.BaseAPI(server, email, password)

get

documentation
get(\*args, \*\*kwargs)

post

documentation
post(\*args, \*\*kwargs)

url

documentation
url(endpoint, \*args, \*\*kwargs)

class remo.api.UploadStatus

documentation
class remo.api.UploadStatus(total_count)

progress

documentation
progress()

update

documentation
update(count)