Kognic IO Client
Project description
Kognic IO Client
Python 3 library providing access to Kognic IO
To install with pip run pip install kognic-io
Documentation & Getting Started Guide
Documentation about how to use the library can be found here
Changelog
All notable changes to this project will be documented in this file.
[1.6.0] - 2023-10-06
Added
- Method to get scenes by uuids, use it with
client.scene.get_scenes_by_uuids([...]) - Method to get an annotation by input uuid
client.annotation.get_annotation_for_input(input_uuid) - Method to get all annotations for a scene
client.annotation.get_annotations_for_scene(scene_uuid) - Method to invalidate scenes
client.scene.invalidate_scenes([scene_uuid, ...], reason) - Method to delete an input
client.input.delete_input(input_uuid) - Renamed
input_typefield onInputtoscene_type - Renamed
input_uuidtoscene_uuidon the following methodsclient.annotation.get_annotationclient.input.invalidate_inputsclient.input.add_annotation_typeclient.input.remove_annotation_typesclient.input.get_inputs_by_uuids
- Renamed
input_uuidparameter inget_annotationtoscene_uuid
Deprecated
- The method
invalidate_inputs(useinvalidate_scenesinstead) - The method
remove_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-29
Added
- Support for asynchronous callbacks in
FileData
[1.4.0] - 2023-09-22
Added
- Added missing
FileData.Format.WEBPto enable use of WebP forFileDataimages (which were already supported forInputModel.Image)
Changed
- Renamed
lidar_and_camerasattribute tolidars_and_camerasonKognicIOClient - Renamed
uuidfield onInputtoscene_uuid - Renamed
input_uuidfield onAnnotationtoscene_uuid - Renamed response from
createmethod fromCreateInputResponsetoCreateSceneResponse. Also renamedinput_uuidfield toscene_uuidin the response. - Renamed
InvalidatedReasonInputtoInvalidatedReasonScene - Moved all scene models (for example
LidarsAndCameras) fromkognic.io.model.inputtokognic.io.model.scene
Deprecated (will be removed in a future release)
lidar_and_camerasattribute onKognicIOClientuuidfield onInputinput_uuidfield onAnnotationCreateInputResponseresponse fromcreatemethod along with itsinput_uuidfieldInvalidatedReasonInput- Scene models in
kognic.io.model.input
[1.3.0] - 2023-08-08
Changed
- Validate 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-05
Changed
- Pin pydantic version to <2
- Remove dependency on
Pillow
[1.2.1] - 2023-05-19
Added
- Add optional attribute max_altitude_angle to fused cylindrical camera model
[1.2.0] - 2023-05-09
Added
- Support for new camera model named Cylindrical model.
Bugfix
- Fixed bug where the calibration types were not used coherently across different calibration models. This resulted in check such as
if calibration.calibration_type == CalibrationType.PINHOLEto fail in some cases.
[1.1.9] - 2023-04-12
Added
- Wrapper function
create_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-17
Added
- Support for custom lens projection coefficients for Principal Point Distortion model.
[1.1.6] - 2023-03-14
Added
- Support for new camera model named Fused Cylindrical model.
Changed
- Fixed 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 to
False.
[1.1.5] - 2023-01-20
Added
- Support for the new input type
aggregated_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 found here. - New parameter
include_contentinget_project_annotationsthat lets you choose whether to fetch the annotation content or not
[1.1.4] - 2022-12-02
Changed
- Bumped dependency on
kognic-base-clientsto1.0.3which introduces retry when uploads fail for TCP or SSL timeout reasons.
[1.1.2] - 2022-11-25
Changed
- Fixed issue with parsing of custom metadata fields
[1.1.1] - 2022-11-11
Added
- The 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 resource
- loaded progressively during the upload via a callback
Refer to the updated documentation for details about how to use the new API features.
Changed
metadatais once again an optional attribute on model classes that use it (CamerasSequenceamong others)
[1.0.2] - 2022-11-01
Changed
- Bumped dependency on
kognic-base-clientsto1.0.1 - Added pagination to the
get_inputsmethod to prevent timeouts
Bugfix
- Metadata should default to an empty dict
[1.0.1] - 2022-10-18
- Updated readme
[1.0.0] - 2022-10-18
This is a major release with breaking changes and refactorings. Please refer to our Annotell-2-Kognic migration guide for details.
Changed
- Annotell becomes Kognic
- Bumped minimum python version from 3.6 to 3.7
- Packaging changes
- Remaining
@dataclasses in our model packages are now pydantic models with better validation
Removed
- Deprecated calibration models
- Deprecated
get_annotationsmethod
Changelog (before rebranding)
[1.3.1] - 2022-09-13
Bugfix
- Changed naming in PrincipalPointDistortionCalibration
[1.3.0] - 2022-09-09
Changed
- Added PrincipalPointDistortionCalibration
[1.2.6] - 2022-08-19
Bugfix
- Fixed error when using deprecated calibration model
annotell.input_api.model.calibration.sensors.LidarCalibration- We encourage updating to use the newer, typed calibration models in
annotell.input_api.model.calibration.{camera, lidar}.*, refer to the calibration documentation for details.
- We encourage updating to use the newer, typed calibration models in
[1.2.5] - 2022-08-18
Changed
- Changed from
internalIdtosceneUuidon initialize input
Bugfix
- Fixed error when using deprecated calibration model
annotell.input_api.model.calibration.sensors.CameraCalibration- We encourage updating to use the newer, typed calibration models in
annotell.input_api.model.calibration.{camera, lidar}.*, refer to the calibration documentation for details.
- We encourage updating to use the newer, typed calibration models in
[1.2.4] - 2022-07-06
Bugfix
- Fix bug where not specifying feature flags led to a runtime error.
[1.2.3] - 2022-06-23
Added
- Feature flags can be specified when creating inputs. This can be used to disable motion compensation.
[1.2.2] - 2022-06-20
Added
- Ability to specify field of view on LIDAR sensor calibrations.
[1.2.1] - 2022-06-08
Added
- Ability to create inputs from a scene
- Ability to create pre-annotations (limited support)
[1.2.0] - 2022-05-05
Changed
annotell-base-clientsis now a dependency forannotell-input-api, used for http requests and file uploads- The generator produced by
client.annotation.get_project_annotationswill now reliably iterate projects with thousands of annotations
Added
- Include
annotation_typesinInput - Method to remove annotation types from an input:
remove_annotation_types
[1.1.5] - 2022-03-29
Bugfix
- Added 'archived' as ProjectBatchStatus
[1.1.4] - 2022-02-17
Added
- MetaDataContainer added with reserved keyword
region. - Added ImageMetaData for shutter start and end times, used for high accuracy multi-sensor projections
[1.1.3] - 2022-01-05
Bugfix
- Fixed download of annotations
[1.1.2] - 2021-12-03
Changed
- Refactor of
file_resource_client.py, split upload and download into separate classes.
Added
- New parameter
timeouttoInputApiClient, which decides what the timeout in seconds is for calls to Annotell API:s and Google Cloud Storage. - Retries when a
ConnectionErroris raised during uploading/downloading of resources to/from Google Cloud Storage. - New input status
Pending. 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-11
Changed
- Fixed import statement to work with python < 3.9
[1.1.0] - 2021-11-03
Added
-
Two 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 in
annotell.input_api.model.calibration.camera. Documentation regarding use can be found here: Documentation -
Field of View support for camera calibrations
-
New Parameter Xi for Fisheye camera calibration model
Changed
-
Two constructor arguments in
InputApiClientandFileResourceClienthave 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-07
Added
- A 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.
Changed
client.calibration.get_calibration()now properly deserializes calibration intoSensorCalibrationEntryinstead of keeping it as a dict.
[1.0.7] - 2021-06-11
Added
createdtimestamp when queryingget_inputs- Method
get_annotation_types
Changed
input_list_idreplaced withannotation_typesfor all createable resources (Cameras,CamerasSeq,LidarsAndCameras,LidarsAndCamerasSeq).
[1.0.6] - 2021-05-28
Added
calibration_idnow available for created inputs via theclient.input.get_inputsmethod.- It is now possible to create your project batches on your own using the
client.project.create_batchmethod. Please contact Annotell's Professional Services before using. More information available in the documentation.
[1.0.5] - 2021-05-06
Changed
- Changed 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.
Bugfixes
- Fixed issue where
invalidate_inputsdid not properly discard response content.
[1.0.4] - 2021-04-26
Added
- Added 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.
Changed
- Made SensorSpecification Optional for all input types
Removed
- Removed sensor_settings from SensorSpecification. The pixel dimensions are now automatically inferred from videos and images.
[1.0.3] - 2021-04-14
Added
- Added an example for download_annotations
- Added check so that
input_list_idandprojectis not used simultaneously when creating inputs
Changed
- Made client and file_client internal
- Fixed bug where client sometimes didn't raise exception when http calls return error codes
- Bugfix where annoutil didn't work due to missing import
- Clarified examples with different images/videos for different sensors and frames.
Removed
- Removed unnecessary parameters
frame_idandrelative_timestampfromlidars_and_cameras
[1.0.1] - 2021-04-06
- Use backport of
dataclassesto support python 3.6.
[1.0.0] - 2021-03-23
- New major release of client. Reworked to be more internally consistent between input types, and use of project and batch identifiers across methods. See docs for 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-02
- Remove unused dependency on annotell-cloud-storage
[0.4.3] - 2021-02-16
- Fixed import bug in annoutil CLI tool.
[0.4.2] - 2021-02-02
Changed
- Changed url for the
get_calibration_datamethod. Does not affect usage of the method in any way.
[0.4.1] - 2021-01-29
Changed
- Removed unused property
deadlinefrom project
[0.4.0] - 2021-01-28
Changed
- Renamed method
upload_and_create_images_input_jobtocreate_inputs_images. - Renamed method
list_projectstoget_projects. - Renamed method
list_project_batchestoget_project_batches. - Changed behaviour of method
download_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 of
get_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 argument
input_idstoinput_internal_idsfor methodinvalidate_inputs. - Use backport of
dataclassesto support python 3.6. - Add missing dependency on
python-dateutil.
Removed
- Methods
count_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-13
Changed
- Removed getting started documentation from
README.mdand instead link to new docs.
[0.3.11] - 2020-12-14
Changed
- Deserialization bugfix in models for
InputBatchandInputBatch.
[0.3.10] - 2020-12-01
Added
- Minor fix in annoutil
[0.3.9] - 2020-11-26
Added
- Bump of required python version to >=3.7
- New explicit models for
lidarandcamera calibrationadded. publish_batchwhich accepts project identifier and batch identifier and marks the batch as ready for annotation.
Changed
- Deprecation warning for the old
lidarandcamera calibrationmodels. No other change in functionality.
[0.3.8] - 2020-11-13
Added
get_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.
Changed
invalidate_inputsnow accepts annotellinternal_ids (UUID)instead of Annotell specific input ids.
[0.3.7] - 2020-11-06
Changed
- bug fix related to oauth session
[0.3.6] - 2020-11-02
Changed
- SLAM - add cuboid timespans,
dynamic_objectsnot includes bothcuboidsandcuboid_timespans
[0.3.5] - 2020-10-19
Added
- Add support for
projectandbatchidentifiers 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.
Deprecated
input_list_idwill be removed in the 0.4.x version
[0.3.4] - 2020-09-10
Changed
- SLAM - add required
sub_sequence_idand optionalsettings
[0.3.3] - 2020-09-10
Changed
- SLAM - add required
sequence_id
[0.3.2] - 2020-09-01
Changed
- SLAM - startTs and endTs not optional in Slam request
[0.3.1] - 2020-07-16
Changed
- If 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 the
InputApiClientby specifying values to themax_upload_retry_attemptsandmax_upload_retry_wait_timeparameters.
[0.3.0] - 2020-07-03
Changed
- The method
create_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.
Bugfixes
- Fixed bug where the uploading of .csv files to GCS crashed if run on some windows machines.
[0.2.9] - 2020-07-02
Added
- New public method in
InputApiClient:count_inputs_for_external_ids.
[0.2.8] - 2020-06-30
Added
- Docstrings for all public methods in the
InputApiClientclass
[0.2.7] - 2020-06-29
Added
- Require time specification to be send when posting slam requests
[0.2.6] - 2020-06-26
Changed
- Removed
CalibrationSpecfromCalibratedSceneMetaDataandSlamMetaData. Updated so thatcreate_calibration_datainInputApiClientonly takes aCalibrationSpecas parameter.
[0.2.5] - 2020-06-22
Bugfixes
- Fixed issue where a path including a "~" would not expand correctly.
[0.2.4] - 2020-06-17
Changed
- Changed pointcloud_with_images model. Images and point clouds are now represented as
ImageandPointCloudcontaining filename and source. Consequently,images_to_sourceis removed fromSourceSpecification.
Added
- create Image inputs via
create_images_input_job - It's now possible to invalidate erroneous inputs via
invalidate_inputs - Support for removing specific inputs via
remove_inputs_from_input_list - SLAM support (not generally available)
Bugfixes
- Fixed issue where annoutils would not deserialize datas correctly when querying datas by internalId
[0.2.3] - 2020-04-21
Changed
- Changed how timestamps are represented when receiving responses.
[0.2.2] - 2020-04-17
Added
- Methods
get_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 :
$ annoutil inputs --get-datas <internal_ids>
$ annoutil inputs-externalid --get-datas <external_ids>
- Support has been added for
Kannalacamera 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-16
Changed
- Change constructor to disable legacy api token support and only accept an
authparameter
[0.1.5] - 2020-04-07
Added
- Method
get_input_jobs_statusnow accepts lists of internal_ids and external_ids as arguments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kognic-io-1.6.0.tar.gz.
File metadata
- Download URL: kognic-io-1.6.0.tar.gz
- Upload date:
- Size: 13.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc23ba5cea65a36de04a311dd551f3f95dd8f52f7f52c533011ae5b262ce716
|
|
| MD5 |
1c2e5474b22c98f401166b477fadeb4f
|
|
| BLAKE2b-256 |
a19e792bd3aa23e081fa58c5f57dfbfa2577b7019b2074a3f007bac8af65652d
|
File details
Details for the file kognic_io-1.6.0-py3-none-any.whl.
File metadata
- Download URL: kognic_io-1.6.0-py3-none-any.whl
- Upload date:
- Size: 80.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a591b326862754129165c5dbc0bdb0c6eeef5938c0916965c63404c2549e2d8
|
|
| MD5 |
4207a561ee37964f3a640cf465f83283
|
|
| BLAKE2b-256 |
08cb384b4536a0ccf12c544c4375ea5ef6620cade792470e4176f2b8bd99cad2
|