Giter VIP home page Giter VIP logo

tassellfanet's Introduction

TasselLFANet

TasselLFANet based on detection method for plant counting, implementation of paper :
TasselLFANet:A Novel Lightweight Multi-Branch Feature Aggregation Neural Network for High-throughput Image-based Maize Tassels Detection and Counting

Main results

Object Detection on MrMT dataset

Model FPS P R F1 [email protected] [email protected]:.95
LFANet-HE 125 0.947 0.926 0.936 0.962 0.518
LFANet 77 0.946 0.942 0.944 0.968 0.546
  • Speed is tested on Nvidia Quadro P5000 GPU(16G)

Object Counting on MrMT dataset

Model MAE RMSE MAPE
LFANet-HE 2.70 3.76 14.3% 0.9751
LFANet 1.80 2.68 9.2% 0.9903

Installation

  1. The code we implement is based on PyTorch 1.8 and Python 3.6, please refer to the file requirements.txt to configure the required environment.
  2. To convenient install the required environment dependencies, you can also use the following command look like this :
$ pip install -r requirements.txt 

Build your own dataset

To train your own datasets on this framework, we recommend that :

  • Annotate your data with the image annotation tool LabelIMG to generate .txt labels.
  • Refer to the config/data.yaml example to configure your own hyperparameters file.
  • Based on the train.py code example configure your own training parameters.

Training

Prepare Your Data

  1. You can download the MrMT dataset from Baidu Drive (9.2GB)
  2. Move your dataset into the data folder, please follow the format look like this :
├── data
│   ├── images
│   │   ├── train
│   │   ├── valid
│   │   └── test
│   ├── labels
│   │   ├── train
│   │   ├── valid
│   │   └── test
  • Run the following command to start training :
$ python train.py --dataset config/data.yaml --batch-size 16 --workers 8

For some reasons, our experiment haven't use a pretrained model, and we recommend that you pretrain if resources are adequate, the gains from this are considerable.

Evaluation

  • Run the following command to evaluate the results :
$ python eval.py --model LFANet.pt --dataset config/data.yaml --imgsz 640

Inference

  • Run the following command on a variety of sources :
$ python infer.py --imgsz 640 --source config/images  # on image
$ python infer.py --imgsz 640 --source 0  # on webcam

Citation

@article{ye2023TasselLFANet,  
  title={TasselLFANet: A Novel Lightweight Multi-Branch Feature Aggregation Neural Network for High-throughput Image-based Maize Tassels Detection and Counting},  
  author={Yu, Zhenghong and Ye, Jianxiong and Li, Cuina and Zhou, Huabing and Li, Xun}, 
  journal={Frontiers in Plant Science}, 
  volume={14},
  pages={1291-1307},
  year={2023},
  doi={10.3389/fpls.2023.1158940}
}

tassellfanet's People

Contributors

ye-sk avatar

Stargazers

 avatar  avatar

Watchers

 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.