Package: kognic-io
Kognic IO ClientPython 3 library providing access to Kognic IOTo install with pip runpip install kognic-ioDocumentation & Getting Started GuideDocumentation about how to use the library can be foundhereChangelogAll notable changes to this project will be documented in this file.[2.1.2] - 2024-02-27Bump dependency onkognic-base-clientsto2.3.4[2.1.1] - 2024-02-21addmax_connectionparameter in resource clients to allow for more control over the number of network connections[2.1.0] - 2024-01-30add API client to order-execution-api, including kognic-io client parameter to override order_execution_api_host[2.0.1] - 2023-11-22Default values onOptionalfields to handle pydantic v2.0.0Adds scene_external_id to the pydantic input model[2.0.0] - 2023-11-17Bumped pydantic to v2. No breaking changes in the kognic-io interface, but if you are using pydantic directly you may need to update your code.[1.8.0] - 2023-10-31AddedUtilities for custom camera calibrationskognic.io.tools.calibration.validationfor validating custom camera calibrationskognic.io.tools.calibration.compilationfor compiling custom camera calibrations to WebAssembly[1.7.0] - 2023-10-18AddedMethod to query request inputs, use it withclient.input.query_inputs(...)create_from_scene(...)now returns created inputsNewInputmodel representing a scene in a requestModelling forCustomCameraCalibrationusing WebAssemblyDeprecatedThe methodget_inputs_with_uuids(useget_scenes_by_uuidsinstead)The methodget_inputs(usequery_inputsinstead)The oldkognic.io.model.input.input_entry.Inputmodel along withkognic.io.model.input.input_entry.InputStatus[1.6.0] - 2023-10-06AddedMethod to get scenes by uuids, use it withclient.scene.get_scenes_by_uuids([...])Method to get an annotation by input uuidclient.annotation.get_annotation_for_input(input_uuid)Method to get all annotations for a sceneclient.annotation.get_annotations_for_scene(scene_uuid)Method to invalidate scenesclient.scene.invalidate_scenes([scene_uuid, ...], reason)Method to delete an inputclient.input.delete_input(input_uuid)ChangedRenamedinput_typefield onInputtoscene_typeRenamedinput_uuidtoscene_uuidon the following methodsclient.annotation.get_annotationclient.input.invalidate_inputsclient.input.add_annotation_typeclient.input.remove_annotation_typesclient.input.get_inputs_by_uuidsRenamedinput_uuidparameter inget_annotationtoscene_uuidDeprecatedThe methodinvalidate_inputs(useinvalidate_scenesinstead)The methodremove_annotation_types(usedelete_inputinstead)input_typeon theInputmodel (usescene_typeinstead)input_uuidparameter in favour ofscene_uuidon the following methodsclient.annotation.get_annotationclient.input.invalidate_inputsclient.input.add_annotation_typeclient.input.remove_annotation_typesclient.input.get_inputs_by_uuids[1.5.0] - 2023-09-29AddedSupport for asynchronous callbacks inFileData[1.4.0] - 2023-09-22AddedAdded missingFileData.Format.WEBPto enable use of WebP forFileDataimages (which were already supported forInputModel.Image)Support for new camera model named custom.ChangedRenamedlidar_and_camerasattribute tolidars_and_camerasonKognicIOClientRenameduuidfield onInputtoscene_uuidRenamedinput_uuidfield onAnnotationtoscene_uuidRenamed response fromcreatemethod fromCreateInputResponsetoCreateSceneResponse. Also renamedinput_uuidfield toscene_uuidin the response.RenamedInvalidatedReasonInputtoInvalidatedReasonSceneMoved all scene models (for exampleLidarsAndCameras) fromkognic.io.model.inputtokognic.io.model.sceneDeprecated (will be removed in a future release)lidar_and_camerasattribute onKognicIOClientuuidfield onInputinput_uuidfield onAnnotationCreateInputResponseresponse fromcreatemethod along with itsinput_uuidfieldInvalidatedReasonInputScene models inkognic.io.model.input[1.3.0] - 2023-08-08ChangedValidate that all required local image and pointcloud files exist before beginning to create scenes.Validation errors will be raised for missing or empty files.ImageandPointCloudfilenamemust refer to a file that exists & contain data unless a callback or raw bytes are provided.
(i.e. there is no validation any timeFileDataare used)Support for new camera model named Principal Point Fisheye model.[1.2.2] - 2023-07-05ChangedPin pydantic version to <2Remove dependency onPillow[1.2.1] - 2023-05-19AddedAdd optional attribute max_altitude_angle to fused cylindrical camera model[1.2.0] - 2023-05-09AddedSupport for new camera model named Cylindrical model.BugfixFixed bug where the calibration types were not used coherently across different calibration models. This resulted in check such asif calibration.calibration_type == CalibrationType.PINHOLEto fail in some cases.[1.1.9] - 2023-04-12AddedWrapper functioncreate_inputsthat allows creation of multiple inputs (with or without a pre-annotation) with a single call. This is useful since it contains wait-logic for the scene to be ready before creating inputs.[1.1.8] - 2023-03-17AddedSupport for custom lens projection coefficients for Principal Point Distortion model.[1.1.6] - 2023-03-14AddedSupport for new camera model named Fused Cylindrical model.ChangedFixed bug where files intended to be uploaded using data from a callback or in-memory blob would sometimes be incorrectly handled if their callback or blob could be coerced toFalse.[1.1.5] - 2023-01-20AddedSupport for the new input typeaggregated_lidars_and_cameras_sequence. This new input type is a sequence of cameras
and point clouds, but the point clouds are aggregated over time. More information can be foundhere.New parameterinclude_contentinget_project_annotationsthat lets you choose whether to fetch the annotation content
or not[1.1.4] - 2022-12-02ChangedBumped dependency onkognic-base-clientsto1.0.3which introduces retry when uploads fail for TCP or SSL timeout reasons.[1.1.2] - 2022-11-25ChangedFixed issue with parsing of custom metadata fields[1.1.1] - 2022-11-11AddedThe raw bytes for each scene resource (Image,PointCloud) may now be provided in different ways:read from a local file, as before (no changes are needed to continue using this behaviour)passed directly when creating the resourceloaded progressively during the upload via a callbackRefer tothe updated documentationfor details about how to use the new API features.Changedmetadatais once again an optional attribute on model classes that use it (CamerasSequenceamong others)[1.0.2] - 2022-11-01ChangedBumped dependency onkognic-base-clientsto1.0.1Added pagination to theget_inputsmethod to prevent timeoutsBugfixMetadata should default to an empty dict[1.0.1] - 2022-10-18Updated readme[1.0.0] - 2022-10-18This is a major release with breaking changes and refactorings.
Please refer to our Annotell-2-Kognicmigration guidefor details.ChangedAnnotell becomes KognicBumped minimum python version from 3.6 to 3.7Packaging changesRemaining@dataclasses in our model packages are now pydantic models with better validationRemovedDeprecated calibration modelsDeprecatedget_annotationsmethodChangelog (before rebranding)[1.3.1] - 2022-09-13BugfixChanged naming in PrincipalPointDistortionCalibration[1.3.0] - 2022-09-09ChangedAdded PrincipalPointDistortionCalibration[1.2.6] - 2022-08-19BugfixFixed error when using deprecated calibration modelannotell.input_api.model.calibration.sensors.LidarCalibrationWe encourage updating to use the newer, typed calibration models inannotell.input_api.model.calibration.{camera, lidar}.*,refer to the calibration documentation for details.[1.2.5] - 2022-08-18ChangedChanged frominternalIdtosceneUuidon initialize inputBugfixFixed error when using deprecated calibration modelannotell.input_api.model.calibration.sensors.CameraCalibrationWe encourage updating to use the newer, typed calibration models inannotell.input_api.model.calibration.{camera, lidar}.*,refer to the calibration documentation for details.[1.2.4] - 2022-07-06BugfixFix bug where not specifying feature flags led to a runtime error.[1.2.3] - 2022-06-23AddedFeature flags can be specified when creating inputs. This can be used to disable motion compensation.[1.2.2] - 2022-06-20AddedAbility to specify field of view on LIDAR sensor calibrations.[1.2.1] - 2022-06-08AddedAbility to create inputs from a sceneAbility to create pre-annotations (limited support)[1.2.0] - 2022-05-05Changedannotell-base-clientsis now a dependency forannotell-input-api, used for http requests and file uploadsThe generator produced byclient.annotation.get_project_annotationswill now reliably iterate projects with thousands of annotationsAddedIncludeannotation_typesinInputMethod to remove annotation types from an input:remove_annotation_types[1.1.5] - 2022-03-29BugfixAdded 'archived' as ProjectBatchStatus[1.1.4] - 2022-02-17AddedMetaDataContainer added with reserved keywordregion.Added ImageMetaData for shutter start and end times, used for high accuracy multi-sensor projections[1.1.3] - 2022-01-05BugfixFixed download of annotations[1.1.2] - 2021-12-03ChangedRefactor offile_resource_client.py, split upload and download into separate classes.AddedNew parametertimeouttoInputApiClient, which decides what the timeout in seconds is for calls to Annotell API:s and Google Cloud Storage.Retries when aConnectionErroris raised during uploading/downloading of resources to/from Google Cloud Storage.New input statusPending. An input will have this status if the input has been validated, but the server is waiting for the associated data to
be uploaded. When all data is uploaded the status of the input will change toProcessing.[1.1.1] - 2021-11-11ChangedFixed import statement to work with python < 3.9[1.1.0] - 2021-11-03AddedTwo new methods has been added for downloading annotations:client.annotation.get_annotationandclient.annotation.get_project_annotations. These two methods will serve annotations
in the OpenLABEL format. With this change the previous method for fetching annotations,client.annotation.get_annotationshas become deprecated.Stricter typing for the calibrations, specifically the camera calibrations. Each of the supported camera calibration models now have their own class inannotell.input_api.model.calibration.camera. Documentation regarding use can be found here:DocumentationField of View support for camera calibrationsNew Parameter Xi for Fisheye camera calibration modelChangedTwo constructor arguments inInputApiClientandFileResourceClienthave been renamed frommax_upload_retry_attemps,max_upload_retry_wait_timetomax_retry_attempts,max_retry_wait_timerespectively.The old camera calibration class will be deprecated in favour of the new classes[1.0.8] - 2021-09-07AddedA new method has been added,get_inputs_with_uuids, which can fetch inputs using only theinput_uuid.annoutilhas a new flag when fetching inputs,annoutil inputs --uuids <comma_separated_uuids>.lidarsandlidars_sequenceinputs now available through the client.A new method has been added,add_annotation_type, which adds additional annotation types to be performed for an input.Changedclient.calibration.get_calibration()now properly deserializes calibration intoSensorCalibrationEntryinstead of keeping it as a dict.[1.0.7] - 2021-06-11Addedcreatedtimestamp when queryingget_inputsMethodget_annotation_typesChangedinput_list_idreplaced withannotation_typesfor all createable resources (Cameras,CamerasSeq,LidarsAndCameras,LidarsAndCamerasSeq).[1.0.6] - 2021-05-28Addedcalibration_idnow available for created inputs via theclient.input.get_inputsmethod.It is now possible to create your project batches on your own using theclient.project.create_batchmethod. Please contact Annotell's Professional Services
before using. More information available in thedocumentation.[1.0.5] - 2021-05-06ChangedChanged the height/width in the unity calibration created in the examples to match the image/videos.Added new field in the Input class, view_link. If the Input was successfully created it will contain an URL to view the input in the Annotell app.BugfixesFixed issue whereinvalidate_inputsdid not properly discard response content.[1.0.4] - 2021-04-26AddedAdded support for providing metadata in the form of a flat KV-pair both on an input-level for all input types, as well as on a frame-level for all sequential input types.ChangedMade SensorSpecification Optional for all input typesRemovedRemoved sensor_settings from SensorSpecification. The pixel dimensions are now
automatically inferred from videos and images.[1.0.3] - 2021-04-14AddedAdded an example for download_annotationsAdded check so thatinput_list_idandprojectis not used simultaneously when creating inputsChangedMade client and file_client internalFixed bug where client sometimes didn't raise exception when http calls return error codesBugfix where annoutil didn't work due to missing importClarified examples with different images/videos for different sensors and frames.RemovedRemoved unnecessary parametersframe_idandrelative_timestampfromlidars_and_cameras[1.0.1] - 2021-04-06Use backport ofdataclassesto support python 3.6.[1.0.0] - 2021-03-23New major release of client. Reworked to be more internally consistent between input types, and use of project and batch identifiers across methods. Seedocsfor more info.client.lidar_and_cameras.createreplacesclient.create_inputs_point_cloud_with_imagesclient.cameras.createreplacesclient.upload_and_create_images_input_jobclient.annotations.get_annotationsreplacesclient.download_annotations[0.4.4] - 2021-03-02Remove unused dependency on annotell-cloud-storage[0.4.3] - 2021-02-16Fixed import bug in annoutil CLI tool.[0.4.2] - 2021-02-02ChangedChanged url for theget_calibration_datamethod. Does not affect
usage of the method in any way.[0.4.1] - 2021-01-29ChangedRemoved unused propertydeadlinefrom project[0.4.0] - 2021-01-28ChangedRenamed methodupload_and_create_images_input_jobtocreate_inputs_images.Renamed methodlist_projectstoget_projects.Renamed methodlist_project_batchestoget_project_batches.Changed behaviour of methoddownload_annotations. The previously optional argumnetrequest_idhas been removed. Additionally, the return
signature is changed to return a list of annotations for each input, instead of a dict as before.Behaviour ofget_inputshas changed. It now receivesproject(identifier, not numerical id anymore), as well as three optional parametersbatch,external_idsandinclude_invalidated. Returns all inputs belonging to the project, with the option of filtering on batch, external ID and whether or not including invalidated inputs. The returned list of classes had additional fields describing which batch each input belongs to, as well as their status (created,processing,failed,invalidated).Changed name of argumentinput_idstoinput_internal_idsfor methodinvalidate_inputs.Use backport ofdataclassesto support python 3.6.Add missing dependency onpython-dateutil.RemovedMethodscount_inputs_for_external_ids,get_internal_ids_for_external_ids,mend_input_data,remove_inputs_from_input_list,list_input_lists,publish_batch,get_requests_for_request_ids,get_requests_for_input_lists,get_input_status,get_input_jobs_status,get_requests_for_project_id,get_datas_for_inputs_by_internal_idsandget_datas_for_inputs_by_external_idshave all been removed.[0.3.12] - 2021-01-13ChangedRemoved getting started documentation fromREADME.mdand instead link to new docs.[0.3.11] - 2020-12-14ChangedDeserialization bugfix in models forInputBatchandInputBatch.[0.3.10] - 2020-12-01AddedMinor fix in annoutil[0.3.9] - 2020-11-26AddedBump of required python version to >=3.7New explicit models forlidarandcamera calibrationadded.publish_batchwhich accepts project identifier and batch identifier and marks the batch as ready for annotation.ChangedDeprecation warning for the oldlidarandcamera calibrationmodels. No other change in functionality.[0.3.8] - 2020-11-13Addedget_inputswhich accepts a project ID or project identifier (external ID) and returns inputs connected to the project.invalidatedfilter parameter to optionally filter only invalidated inputs. Also exposed in annoutil asannoutil projects 1 --invalidated.Changedinvalidate_inputsnow accepts annotellinternal_ids (UUID)instead of Annotell specific input ids.[0.3.7] - 2020-11-06Changedbug fix related to oauth session[0.3.6] - 2020-11-02ChangedSLAM - add cuboid timespans,dynamic_objectsnot includes bothcuboidsandcuboid_timespans[0.3.5] - 2020-10-19AddedAdd support forprojectandbatchidentifiers for input request.
Specifying project and batch adds input to specified batch.
When only sending project, inputs are added to the latest open batch for the project.Deprecatedinput_list_idwill be removed in the 0.4.x version[0.3.4] - 2020-09-10ChangedSLAM - add requiredsub_sequence_idand optionalsettings[0.3.3] - 2020-09-10ChangedSLAM - add requiredsequence_id[0.3.2] - 2020-09-01ChangedSLAM - startTs and endTs not optional in Slam request[0.3.1] - 2020-07-16ChangedIf the upload of point clouds or images crashes and returns status code 429, 408 or 5xx the script will
retry the upload before crashing. The default settings may be changed when initializing theInputApiClientby specifying values to themax_upload_retry_attemptsandmax_upload_retry_wait_timeparameters.[0.3.0] - 2020-07-03ChangedThe methodcreate_inputs_point_cloud_with_imagesinInputApiClientnow takes an extra parameter:dryrun: bool.
If set toTrueall the validation checks will be run but no inputJob will be created, and
if it is set toFalsean inputJob will be created if the validation checks all pass.BugfixesFixed bug where the uploading of .csv files to GCS crashed if run on some windows machines.[0.2.9] - 2020-07-02AddedNew public method inInputApiClient:count_inputs_for_external_ids.[0.2.8] - 2020-06-30AddedDocstrings for all public methods in theInputApiClientclass[0.2.7] - 2020-06-29AddedRequire time specification to be send when posting slam requests[0.2.6] - 2020-06-26ChangedRemovedCalibrationSpecfromCalibratedSceneMetaDataandSlamMetaData. Updated
so thatcreate_calibration_datainInputApiClientonly takes aCalibrationSpecas parameter.[0.2.5] - 2020-06-22BugfixesFixed issue where a path including a "~" would not expand correctly.[0.2.4] - 2020-06-17ChangedChanged pointcloud_with_images model. Images and point clouds are now represented asImageandPointCloudcontaining filename and source. Consequently,images_to_sourceis removed fromSourceSpecification.Addedcreate Image inputs viacreate_images_input_jobIt's now possible to invalidate erroneous inputs viainvalidate_inputsSupport for removing specific inputs viaremove_inputs_from_input_listSLAM support (not generally available)BugfixesFixed issue where annoutils would not deserialize datas correctly when querying datas by internalId[0.2.3] - 2020-04-21ChangedChanged how timestamps are represented when receiving responses.[0.2.2] - 2020-04-17AddedMethodsget_datas_for_inputs_by_internal_idsandget_datas_for_inputs_by_external_idscan be used to get whichDataare part of anInput, useful in order to check which images, lidar-files have been uploaded. Both are also available in the CLI via :$annoutilinputs--get-datas<internal_ids>$annoutilinputs-externalid--get-datas<external_ids>Support has been added forKannalacamera types. Whenever adding calibration forKannalaundistortion coefficients must also be added.Calibration is now represented as a class and is no longer just a dictionary, making it easier to understand how the Annotell format is structured and used.[0.2.0] - 2020-04-16ChangedChange constructor to disable legacy api token support and only accept anauthparameter[0.1.5] - 2020-04-07AddedMethodget_input_jobs_statusnow accepts lists of internal_ids and external_ids as arguments.