Skip to content

Machine learning pipeline for a pixel-wise soil crop residue cover estimator

Notifications You must be signed in to change notification settings

brandonxu360/residue-estimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

residue-estimator

This repository contains the code for developing a machine learning model to estimate soil crop residue levels from images. Designed for integration into a mobile application, this model aims to provide a quick, accessible alternative to traditional residue estimation methods, like the line-transect method.

Installation

This project is containerized with Docker; to set up and run this project, it is recommended to have Docker installed on your machine. This will standardize the development environment and make the use of HPC resources easier.

Note: The commands in this guide are provided in Bash and were run from the repository directory on an Ubuntu system.

1. Clone the Repository

git clone https://github.com/brandonxu360/residue-estimator.git
cd residue-estimator

2. Set Up Data Directory

  • Ensure you have the necessary image data stored in a local folder. By default, this is expected to be in the data/ directory at the root level of the project.
  • The image data can be found at here. You may need to request access from maintainers.
  • Inside the data/ folder, the structure should precisely follow that of the online data source. It is easiest to simply download the data into the /data folder. In general, you can expect:
    • data/images/label — containing the labeled images
    • data/images/original — containing the original images

Note: If your data is stored elsewhere, you will need to provide the correct location when running the container.

3. Pull/Build the Docker Image

Our Docker images can be found on our Docker Hub Repository.

Recommended: Instead of building the Docker image from scratch, you can pull it directly from Docker Hub using the following command:

docker pull brandonxu/residue-estimator-model:version1.1

This is recommended to guarantee image consistency.

Alternatively, use the following command to build the Docker image from the Dockerfile:

docker build -t brandonxu/residue-estimator-model:version1.1 .

4. Run the Container

After pulling the Docker image, run the container with the following command, mapping your local data directory to the container:

docker run --rm -v $(pwd)/data:/app/data brandonxu/residue-estimator-model:version1.1

For interactive mode, use:

sudo docker run --rm -u $(id -u):$(id -g) -it -v "$(pwd)/data:/app/data" brandonxu/residue-estimator-model:version1.1

Note: If your data is stored in a different location, please replace $(pwd)/data with that location.

For more information about running containers, please visit the Docker docs:

Maintainers

For access requests or further information, please contact:

About

Machine learning pipeline for a pixel-wise soil crop residue cover estimator

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published