Skip to main content

set of functions for common deeplearning tasks.

Project description

Agriculture Image Metadata

A Linked Data–based metadata model for agricultural image data powered by Vision+Robotics

This repository provides an ontology and python package for image dataset in agricultural domains (greenhouse, open field, arable crops, horticulture, phenotyping).

The goal is to offer a lightweight, interoperable, FAIR‑friendly schema that leverages existing ontologies and codelists, while adding only minimal project‑specific extensions where necessary.

Canonical namespace & hosting

  • Namespace: https://w3id.org/agri-image/
  • Ontology: ontology/ontology.ttl will be hosted at https://w3id.org/agri-image

Repository structure

## examples
├── examples
│   ├── custom_dataset_example.py
│   ├── filtering_class_based.py
│   ├── filtering_query_based.py
│   ├── your_custom_dataset.json
│   └── your_custom_dataset.yaml
├── metadata_vision ## Package for loading etc
...
├── ontology
│   ├── dummy_dataset_output.json
│   ├── dummy_dataset_output.ttl
│   └── ontology.ttl
LICENSE

Metadata Structure

The idea is to create a dataset that can consist of:

  • fields: consisting of
    • plots/rows
      • which have crops and weeds
      • properties of:
        • soilType
        • surfaceLayer
        • weatherConditions Data is collected by a machine/platform
  • platform: has sensors:
    • Camera: unique cam_id and properties
    • Lidar: To be implemented in near future
    • GPS: To be implemented in near future
  • images: list of images which links to field, plot, platform and sensors
# DatasetMetadata(RDFModel)
#     hasField: list[FieldMetadata] | FieldMetadata
    # hasPlot: PlotMetadata
    # plot.hasCrop: CropMetadata | list[CropMetadata]
    # plot.hasWeed: CropMetadata | list[CropMetadata]
    # platform: PlatformMetadata list[PlatformMetadata]
    # platform.hasSensor: list[CameraMetadata] | CameraMetadata]
    # images: ImageMetadata | list[ImageMetadata]

Install for deployment

pip install metadata_vision@git+https://github.com/TeamWalabi/agriculture-image-metadata.git

Folder structure for deployment

We recommend following folder structure:

dataset_name / raw_data / field_id / plot_id / platform_id / cam_id / optional[YYYYMMDD]
# although for some projects it make sense to use:
dataset_name / raw_data / field_id / plot_id / platform_id / YYYYMMDD / cam_id
## inside the folder cam_id you have
## XXX.png files and XXX.metadata.json files describing ImageMetadata
# to facilitate with the folder structure have a look at utils.file_system.py

This looks complicated but this make is ideal for:

  • Timeseries
  • Drone data with field and plots
  • Multiple machines on a field.
  • Machine is flexibile can be a:
    • harvesting robot
    • data platform
    • or in a greenhouse an device which has multiple camera's sensors

Recreate ontology

To recreate the ontology:

python3 metadata_vision/create_ontology.py

Commit / validating:

Install aditional packages

pip install -e .[test]
## validate if everything is working correctly with
pytest tests/

License

This project is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. See LICENSE.

You may use, modify, and distribute the contents as long as you provide attribution.

Contributing

Suggestions and pull requests are welcome, especially for improving ontology mappings or adding reusable examples.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agri_image_meta-1.0.0.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agri_image_meta-1.0.0-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file agri_image_meta-1.0.0.tar.gz.

File metadata

  • Download URL: agri_image_meta-1.0.0.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for agri_image_meta-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e16d564871e63a6d8134094fa1d2b1db2783ae1c590f484ddc7625322d21ace1
MD5 609cd4b4ea4ee63f8b4db3bc7ca9c99f
BLAKE2b-256 66db9038a4d3dabf2a05cbc9b6249175c5f33ca804308839217072bcdad52606

See more details on using hashes here.

File details

Details for the file agri_image_meta-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agri_image_meta-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39dbd76fc1622feb862c05926aa207df5bdb64dc606e3688cbc7d8d356f12f7b
MD5 ae3643f15172e61f437c0a6b9d4b050e
BLAKE2b-256 3dd9466b8b3cab3d5c8676aa35042f0e979d5f6b41a33a17912b061ae4c6e082

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page