ImageDataCSV
ImageDataProcessor Objects
class ImageDataProcessor()
Processing for Image data, used when loading images
ImageDataCSV Objects
class ImageDataCSV(CSVParser.CSVParser, ImageDataProcessor)
ApertureDB Image Data.
This class loads the Image Data which is present in a CSV file, and converts it into a series of ApertureDB queries.
filename
, PROP_NAME_1
, ... PROP_NAME_N
, constraint_PROP1
, format
OR
url
, PROP_NAME_1
, ... PROP_NAME_N
, constraint_PROP1
, format
OR
s3_url
, PROP_NAME_1
, ... PROP_NAME_N
, constraint_PROP1
, format
OR
gs_url
, PROP_NAME_1
, ... PROP_NAME_N
, constraint_PROP1
, format
Example CSV file::
filename,id,label,constraint_id,format
/home/user/file1.jpg,321423532,dog,321423532,jpg
/home/user/file2.jpg,42342522,cat,42342522,png
...
Example usage:
data = ImageDataCSV("/path/to/ImageData.csv")
loader = ParallelLoader(client)
loader.ingest(data)
or
adb ingest from-csv /path/to/ImageData.csv --ingest-type IMAGE
In the above example, the constraint_id ensures that an Image with the specified id would be only inserted if it does not already exist in the database.
ImageUpdateDataCSV Objects
class ImageUpdateDataCSV(SingleEntityUpdateDataCSV, ImageDataProcessor)
ApertureDB Image CSV Parser for Adding an Image and updating the properties on the image. Usage is in EntityUpdateDataCSV.
Note that this class will not change a blob in an existing entity. If looking to change a blob in an existing entity, look at ImageForceNewestDataCSV, but be careful of all caveats.
ImageForceNewestDataCSV Objects
class ImageForceNewestDataCSV(BlobNewestDataCSV, ImageDataProcessor)
ApertureDB Image CSV Parser for Maintaining a Blob set with changing blob data. See BlobNewestDataCSV for usage.
ImageSparseAddDataCSV Objects
class ImageSparseAddDataCSV(SparseAddingDataCSV, ImageDataProcessor)
ApertureDB Spare Loading Image Data.
ImageSparseAddDataCSV should be used the same as ImageDataCSV.
See SparseAddingDataCSV for description of when to use this versus ImageDataCSV.
Example CSV file::
filename,id,label,constraint_id,format
/home/user/file1.jpg,321423532,dog,321423532,jpg
/home/user/file2.jpg,42342522,cat,42342522,png
...
Example usage:
data = ImageSparseAddDataCSV("/path/to/ImageData.csv")
loader = ParallelLoader(client)
loader.ingest(data)