Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentaiton config init #63

Merged
merged 29 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0fa7772
Merge pull request #56 from Project-AgML/dev
amogh7joshi Oct 26, 2024
f5e2d48
Merge pull request #58 from Project-AgML/dev
amogh7joshi Oct 29, 2024
d0d0250
Define pyproject file based on setup.py file
lalmei Nov 22, 2024
a2e4893
formating fixes
lalmei Nov 22, 2024
0b8d322
Add some basic documentation to sync deps, and build project
lalmei Nov 22, 2024
a51a2cf
run tests with coverage
lalmei Nov 22, 2024
841dd07
fix tests
lalmei Nov 22, 2024
506d778
Merge pull request #60 from lalmei/feat/dev_tools
lalmei Nov 22, 2024
0cb18b7
Merge pull request #61 from Project-AgML/feat/tests
lalmei Nov 22, 2024
dc82942
add documentaiton config init
lalmei Nov 24, 2024
2642894
move and run doc scripts for code reference and reference
lalmei Nov 25, 2024
aeddcbe
init docs workflow
lalmei Nov 25, 2024
e7feb99
fix workflow file
lalmei Nov 25, 2024
81256e3
fix --docs -> --only-group docs
lalmei Nov 25, 2024
bf76cf9
use config/mkdocks.yml to build documentation.
lalmei Nov 25, 2024
87d6828
remove gh publish
lalmei Nov 25, 2024
098fcea
add deploy
lalmei Nov 25, 2024
9f7de3b
add force option to gh-deploy
lalmei Nov 25, 2024
0243f1a
do preview deployment
lalmei Nov 25, 2024
ea7d496
fix typo
lalmei Nov 25, 2024
9c6f40d
move image assets, and add associated markdown pages for development …
lalmei Nov 25, 2024
7a795b6
add release draft
lalmei Nov 28, 2024
48975ad
merge dev
lalmei Nov 28, 2024
55ccf8f
fix conflixt issues to dev
lalmei Nov 28, 2024
37c3d94
more conflict issues
lalmei Nov 28, 2024
7e760a9
add release drafter to document prs
lalmei Nov 28, 2024
490674f
fix config in release drafter
lalmei Nov 28, 2024
ce88cfb
Add dataset listings and pages to site documentation
lalmei Nov 30, 2024
9821d0b
run release draft in dev for now too.
lalmei Nov 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: docs
on: [push, pull_request]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false


jobs:
deploy:
environment:
name: documenation
url: ${{steps.deployement.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-

- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"

- name: Check if cache used
if: steps.setup-uv.outputs.cache-hit == 'true'
run: echo "Cache was restored"

- run: uv sync --only-group docs

- run: uv run mkdocs build --config-file config/mkdocs.yml

# - run: uv run mkdocs gh-deploy --force --config-file config/mkdocs.yml

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'site/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
42 changes: 42 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
- dev
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
config-name: release_draft.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ __MACOSX
# Extra directories/files
/**data*/

!tests/*/*
agml/_helios
agml/helios_config.sh
agml/train
Expand Down
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ We will then review the changes and review next steps for adding the dataset int


### Installing uv
<<<<<<< HEAD

Install uv follow the guidelines in https://docs.astral.sh/uv/getting-started/installation/, it is recommended to use the standalone installation.
=======
Dependencies and admin actions are done using `uv`. To Install uv follow the guidelines in https://docs.astral.sh/uv/getting-started/installation/, it is recommended to use the standalone installation.
>>>>>>> dev


### Building Project
Expand Down
74 changes: 37 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="/figures/agml-logo.png" alt="agml framework" width="400" height="400">
<img src="assets/agml-logo.png" alt="agml framework" width="400" height="400">
</p>

----
Expand All @@ -12,10 +12,10 @@ We're looking to hire a postdoc with both Python library development and ML expe

## Overview
AgML is a comprehensive library for agricultural machine learning. Currently, AgML provides
access to a wealth of public agricultural datasets for common agricultural deep learning tasks. In the future, AgML will provide ag-specific ML functionality related to data, training, and evaluation. Here's a conceptual diagram of the overall framework.
access to a wealth of public agricultural datasets for common agricultural deep learning tasks. In the future, AgML will provide ag-specific ML functionality related to data, training, and evaluation. Here's a conceptual diagram of the overall framework.

<p align="center">
<img src="/figures/agml-framework.png" alt="agml framework" width="350" height="291">
<img src="assets/agml-framework.png" alt="agml framework" width="350" height="291">
</p>

AgML supports both the [TensorFlow](https://www.tensorflow.org/) and [PyTorch](https://pytorch.org/) machine learning frameworks.
Expand Down Expand Up @@ -45,7 +45,7 @@ loader = agml.data.AgMLDataLoader('apple_flower_segmentation')
```

You can then use the in-built processing methods to get the loader ready for your training and evaluation pipelines. This includes, but
is not limited to, batching data, shuffling data, splitting data into training, validation, and test sets, and applying transforms.
is not limited to, batching data, shuffling data, splitting data into training, validation, and test sets, and applying transforms.

```python
import albumentations as A
Expand Down Expand Up @@ -125,35 +125,35 @@ model.run_training(loader)

| Dataset | Task | Number of Images |
| :--- | ---: |-----------------:|
[bean_disease_uganda](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/bean_disease_uganda.md) | Image Classification | 1295 |
[carrot_weeds_germany](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/carrot_weeds_germany.md) | Semantic Segmentation | 60 |
[plant_seedlings_aarhus](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_seedlings_aarhus.md) | Image Classification | 5539 |
[soybean_weed_uav_brazil](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/soybean_weed_uav_brazil.md) | Image Classification | 15336 |
[sugarcane_damage_usa](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/sugarcane_damage_usa.md) | Image Classification | 153 |
[crop_weeds_greece](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/crop_weeds_greece.md) | Image Classification | 508 |
[sugarbeet_weed_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/sugarbeet_weed_segmentation.md) | Semantic Segmentation | 1931 |
[rangeland_weeds_australia](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/rangeland_weeds_australia.md) | Image Classification | 17509 |
[fruit_detection_worldwide](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/fruit_detection_worldwide.md) | Object Detection | 565 |
[leaf_counting_denmark](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/leaf_counting_denmark.md) | Image Classification | 9372 |
[apple_detection_usa](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_usa.md) | Object Detection | 2290 |
[mango_detection_australia](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/mango_detection_australia.md) | Object Detection | 1730 |
[apple_flower_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_flower_segmentation.md) | Semantic Segmentation | 148 |
[apple_segmentation_minnesota](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_segmentation_minnesota.md) | Semantic Segmentation | 670 |
[rice_seedling_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/rice_seedling_segmentation.md) | Semantic Segmentation | 224 |
[plant_village_classification](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_village_classification.md) | Image Classification | 55448 |
[autonomous_greenhouse_regression](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/autonomous_greenhouse_regression.md) | Image Regression | 389 |
[grape_detection_syntheticday](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_syntheticday.md) | Object Detection | 448 |
[grape_detection_californiaday](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_californiaday.md) | Object Detection | 126 |
[grape_detection_californianight](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_californianight.md) | Object Detection | 150 |
[guava_disease_pakistan](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/guava_disease_pakistan.md) | Image Classification | 306 |
[apple_detection_spain](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_spain.md) | Object Detection | 967 |
[apple_detection_drone_brazil](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_drone_brazil.md) | Object Detection | 689 |
[plant_doc_classification](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_doc_classification.md) | Image Classification | 2598 |
[plant_doc_detection](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/plant_doc_detection.md) | Object Detection | 2346 |
[wheat_head_counting](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/wheat_head_counting.md) | Object Detection | 6512 |
[peachpear_flower_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/peachpear_flower_segmentation.md) | Semantic Segmentation | 42 |
[red_grapes_and_leaves_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/red_grapes_and_leaves_segmentation.md) | Semantic Segmentation | 258 |
[white_grapes_and_leaves_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/white_grapes_and_leaves_segmentation.md) | Semantic Segmentation | 273 |
[bean_disease_uganda](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/bean_disease_uganda.md) | Image Classification | 1295 |
[carrot_weeds_germany](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/carrot_weeds_germany.md) | Semantic Segmentation | 60 |
[plant_seedlings_aarhus](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_seedlings_aarhus.md) | Image Classification | 5539 |
[soybean_weed_uav_brazil](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/soybean_weed_uav_brazil.md) | Image Classification | 15336 |
[sugarcane_damage_usa](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/sugarcane_damage_usa.md) | Image Classification | 153 |
[crop_weeds_greece](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/crop_weeds_greece.md) | Image Classification | 508 |
[sugarbeet_weed_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/sugarbeet_weed_segmentation.md) | Semantic Segmentation | 1931 |
[rangeland_weeds_australia](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/rangeland_weeds_australia.md) | Image Classification | 17509 |
[fruit_detection_worldwide](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/fruit_detection_worldwide.md) | Object Detection | 565 |
[leaf_counting_denmark](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/leaf_counting_denmark.md) | Image Classification | 9372 |
[apple_detection_usa](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_usa.md) | Object Detection | 2290 |
[mango_detection_australia](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/mango_detection_australia.md) | Object Detection | 1730 |
[apple_flower_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_flower_segmentation.md) | Semantic Segmentation | 148 |
[apple_segmentation_minnesota](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_segmentation_minnesota.md) | Semantic Segmentation | 670 |
[rice_seedling_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/rice_seedling_segmentation.md) | Semantic Segmentation | 224 |
[plant_village_classification](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_village_classification.md) | Image Classification | 55448 |
[autonomous_greenhouse_regression](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/autonomous_greenhouse_regression.md) | Image Regression | 389 |
[grape_detection_syntheticday](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_syntheticday.md) | Object Detection | 448 |
[grape_detection_californiaday](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_californiaday.md) | Object Detection | 126 |
[grape_detection_californianight](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/grape_detection_californianight.md) | Object Detection | 150 |
[guava_disease_pakistan](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/guava_disease_pakistan.md) | Image Classification | 306 |
[apple_detection_spain](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_spain.md) | Object Detection | 967 |
[apple_detection_drone_brazil](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/apple_detection_drone_brazil.md) | Object Detection | 689 |
[plant_doc_classification](https://github.com/Project-AgML/AgML/blob/dev/docs/datasets/plant_doc_classification.md) | Image Classification | 2598 |
[plant_doc_detection](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/plant_doc_detection.md) | Object Detection | 2346 |
[wheat_head_counting](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/wheat_head_counting.md) | Object Detection | 6512 |
[peachpear_flower_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/peachpear_flower_segmentation.md) | Semantic Segmentation | 42 |
[red_grapes_and_leaves_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/red_grapes_and_leaves_segmentation.md) | Semantic Segmentation | 258 |
[white_grapes_and_leaves_segmentation](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/white_grapes_and_leaves_segmentation.md) | Semantic Segmentation | 273 |
[ghai_romaine_detection](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/ghai_romaine_detection.md) | Object Detection | 500 |
[ghai_green_cabbage_detection](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/ghai_green_cabbage_detection.md) | Object Detection | 500 |
[ghai_iceberg_lettuce_detection](https://github.com/Project-AgML/AgML/blob/main/docs/datasets/ghai_iceberg_lettuce_detection.md) | Object Detection | 500 |
Expand All @@ -170,13 +170,13 @@ model.run_training(loader)

### Using Public Agricultural Data

AgML aims to provide easy access to a range of existing public agricultural datasets The core of AgML's public data pipeline is
[`AgMLDataLoader`](/agml/data/loader.py). You can use the `AgMLDataLoader` or `agml.data.download_public_dataset()` to download
the dataset locally from which point it will be automatically loaded from the disk on future runs.
AgML aims to provide easy access to a range of existing public agricultural datasets The core of AgML's public data pipeline is
[`AgMLDataLoader`](/agml/data/loader.py). You can use the `AgMLDataLoader` or `agml.data.download_public_dataset()` to download
the dataset locally from which point it will be automatically loaded from the disk on future runs.
From this point, the data within the loader can be split into train/val/test sets, batched, have augmentations and transforms
applied, and be converted into a training-ready dataset (including batching, tensor conversion, and image formatting).

To see the various ways in which you can use AgML datasets in your training pipelines, check out
To see the various ways in which you can use AgML datasets in your training pipelines, check out
the [example notebook](/examples/AgML-Data.ipynb).

## Annotation Formats
Expand Down
Loading
Loading