Giter Site home page Giter Site logo

eric-1986 / facrsa Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 176.3 MB

An automated pipeline for high-throughput analysis of crop root system architecture.

License: GNU General Public License v3.0

Shell 0.02% JavaScript 20.72% Python 47.89% HTML 31.37%

facrsa's Introduction

๐Ÿ”— Guide

faCRSA

An automated pipeline for high-throughput analysis of crop root system architecture. pipeline

Use faCRSA webserver

โค๏ธ Try faCRSA at https://facrsa.aiphenomics.com/. You can see help documents about faCRSA usage on the Github page (Section 3. Usage).

Deploy faCRSA in a private environment

1. Installation and launcher

  • faCRSA has been tested under Ubuntu 18.04 LTS, CentOS 7, macOS 12 Monterey, and Windows 10 with Python 3.6.0.
  • Install with Conda or manually.
  • โš ๏ธBefore installing faCRSA, you must install Anaconda.

1.1 Install with Conda (Recommended)

1.1.1 Install faCRSA from PyPI
# Create a clear environment for faCRSA
conda create -n facrsa python=3.6
conda activate facrsa

# Install faCRSA
pip install faCRSA
1.1.2 Launch faCRSA
# Launch task queue
facrsa-queue

# Create a new cmd window
# Launch faCRSA web
conda activate facrsa
facrsa-web
1.1.3 Open web page

Copy the URL address (e.g. http://127.0.0.1:5000/) output from the cmd window and open it in the browser.

1.2 Install manually

1.2.1 Clone faCRSA Github repository
# We recommend cloning the faCRSA repository into a clear folder.
cd {your folder}
git clone https://github.com/njauzrn/faCRSA.git
cd faCRSA
1.2.2 Install Python requirements
# Create a clear environment for faCRSA
conda create -n facrsa python=3.6
conda activate facrsa

# Install Python requirements
pip install -r requirements.txt
1.2.3. Launch faCRSA
# Launch task queue
python huey_consumer.py task_queue.huey

# Create a new cmd window
# Launch faCRSA web
conda activate facrsa
flask run
1.2.4. Open web page

Copy the URL address (e.g. http://127.0.0.1:5000/) output from the cmd window and open it in the browser.

2. faCRSA initialization

When you visit the web page for the first time, it will automatically jump to the initialization page. You can set SMTP server information in this page, which used to notify task status. If you don't need this function, please click the following link to skip.

image

Usage

1 Submit a Task

  1. Click "Submit a new task" to load a task. We recommend you create an account to manage tasks and upload private plugins.
  2. Input task information and upload images.
    • Task Name: set a name to distinguish different tasks.
    • Description: set some information about this task.
    • Pixel-to-cm Conversion Factor (CF): image
    • Segmentation Plugin: select a model to segment root images (default: RootSeg). You can upload a private plugin to segment more types of crops and imaging backgrounds (click here to study how to develop it).
    • E-mail (Optional): receive task notification emails.
    • Upload:
      • Only several formats (jpg / png / zip) are allowed to upload.
      • A single task can only upload the same format.
  3. Submit your task and it will automatically redirect to the schedule page.
  4. You will be redirected to the result page and receive a task notification email.

2 View results

  1. When the task is completed, you will receive a notification email with a link to the result page.
  2. You can viste each results online or download them as a zipfile.

3 Upload private plugin

โš ๏ธBefore uploading, you must create an account.

  1. Click "Add a plugin" in the "My Plugin" page.
  2. Input plugin information and upload files.

4 Use private plugin

Select each plugin in the "add task" page.

Development

1. Private plugin

๐Ÿ”— Please click https://file.aiphenomics.com/demo_plugin.zip to download the demo code of private plugin.
โš ๏ธEach plugin must be developed based on the following packages.

numpy==1.19.2
tensorflow==2.4.0

The deep learning model must be constructed by Kears in Tensorflow (code: from tensorflow.keras.layers import *).

Development guide

  1. Plugin structure:
  • network.py: the deep learning model constructed in the Python programming language.

This file must include a function named "main" without any parameters.

  • weight.h5: model weight file (must be .h5 format)
  1. Package these files in zip format.
  • weight.h5: model weight file (must be .h5 format)
  1. Package these files in zip format.
  2. Test the availability of each plugin and upload it to faCRSA.

2 Training model

RootSeg could be trained for images from other crops and imaging backgrounds.

  1. Download the model folder (faCRSA/RootSeg) and unzip the package.
  2. Use the produce_train_txt script to generate a training file that includes image paths.
  3. Open the train script and set customized parameters, such as learning rate, training epoch and date folder.
  4. Switch to the training environment (e.g. facrsa) and start model training.

Update

  • 2022.08.31

    1. Fix abnormal program operation caused by file name.
    2. Fix task failure causing queue termination.
    3. Add an update notification on the home page.
  • 2022.08.22

    1. Merge a horizontally flipped image with the initial masked image to improve segment accuracy.
  • 2022.08.21

    1. Add the model training scripts for users to easily train the model.
  • 2022.08.06

    1. Support to measure root angle (Alpha Version).
    • angle
    1. Fix several bugs.

    2. Increase the speed of analysis.

TODO

  • Update weight files.

  • Improve the measurement accuracy of root angle.

Contact

If you have any questions or suggestions, please contact Ruinan Zhang ([email protected]) at Nanjing Agricultural University.

facrsa's People

Contributors

zrnupping avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.