geococo.cli =========== .. py:module:: geococo.cli Attributes ---------- .. autoapisummary:: geococo.cli.app Functions --------- .. autoapisummary:: geococo.cli.new geococo.cli.copy geococo.cli.add Module Contents --------------- .. py:data:: app .. py:function:: new(json_path) Initialize a new CocoDataset with user-prompted metadata .. py:function:: copy(source_json, dest_json, update_meta = True) Copy and (optionally) update the metadata of an existing CocoDataset .. py:function:: add(image_path, labels_path, json_path, output_dir, width, height, id_attribute = None, name_attribute = None, super_attribute = None) Transform and add GIS annotations to an existing CocoDataset This method generates a COCO dataset by moving across the given image (image_path) with a moving window (image_size), constantly checking for intersecting annotations (labels_path) that represent image objects in said image (e.g. buildings in satellite imagery; denoted by (super)category name and/or id). Each valid intersection will add n Annotations entries to the dataset (json_path) and save a subset of the input image that contained these entries (output_dir). The output data size depends on your input labels, as the moving window adjusts its step size to accommodate the average annotation size, optimizing dataset representation and minimizing tool configuration. Each addition will also increment the dataset version: patch if using the same image_path, minor if using a new image_path, and major if using a new output_dir.