Giter Club home page Giter Club logo

mba-2023's Introduction

MBA-2023

Paper Introduction

Title: A Quantitative Spectra Analysis Framework Combining Mixup and Band Attention for Predicting Soluble Solid Content of Blueberries.

The original paper can be found at https://doi.org/10.1007/978-3-031-40292-0_30.

Abstract: Hyperspectral imaging can rapid and non-destructive monitor physical characteristics and intrinsic chemical information of food. In recent years, many studies have applied hyperspectral imaging to evaluate the internal quality of fruits. However, due to the influence of environmental factors, there are abnormal samples in the collected data. Furthermore, the model faces challenges such as limited data availability and insufficient diversity in the dataset. In this study, we collected a total of 1010 hyperspectral images of blueberries and measured their soluble solid content ( SSC). To reduce the influence of abnormal samples and increase the diversity of samples, we propose a deep learning framework combining mixup and band attention to predict blueberry SSC. The mixup module performs data augmentation on both spectra and SSC values, enhancing sample diversity and improving the generalization performance of the model. The band attention module captures cross-band information and learns band weights, enabling the model to focus on the bands relevant to SSC. Furthermore, we find that bands with higher weights are consistent with SSC-sensitive bands in existing knowledge, which improves the interpretability of the model.

MBA framework: MBA-architecture.png

Requirements

requirements.txt

Description of each Python file

"""
--MBA-2023/
----checkpoints/
----data/
----images/
----logger/: Output experimental results, yaml files, logs
----models/: 
--------ablation_1.py
--------ablation_2.py
--------MBA.py
--------mix.py: mixup module
--------model_loader.py
----plot/: 
--------PLOT.py: plot utils
----calculate_band_weight.py: Load the pre trained model, calculate the average weight of each band, and draw a graph
----calculate_result.py: Load yaml file to calculate experimental results
----config.py: Hyperparameter configuration
----dataloader.py: Read data, define Dataset classes, load DataLoaders, etc
----init.py
----load_model_for_test.py: Load the pre trained model
----main.py
----metrics.py: Calculate regression evaluation indicators(R2/MSE/...)
----schedulers.py
----utils.py
----yaml_utils.py
"""

Data format

Brix Hardness 393.7nm ... 1001.4nm
8.0 3.0 0.1571 ... 0.1392
11.0 4.0 0.1606 ... 0.1438
... ... ... ... ...

The first column represents Brix (soluble solid content), the second column represents hardness, and the other columns represent different bands. Each row represents a sample, and the values from the third to last columns represent the reflectance in that band. In the data folder we present some sample data.

How to Run Your Own Data

For your own data, you need to customize the function in dataloader.py ->read_single_csv_data. And make corresponding modifications to other relevant parts(config.py -> Constant.train_csv_path_list, etc.).

Citation

If you use this code, or otherwise found our work valuable, please cite:

@InProceedings{10.1007/978-3-031-40292-0_30,
author="Li, Zhaokui
and Zhang, Jinen
and Li, Wei
and Li, Fei
and Bi, Ke
and Li, Hongli",
editor="Jin, Zhi
and Jiang, Yuncheng
and Buchmann, Robert Andrei
and Bi, Yaxin
and Ghiran, Ana-Maria
and Ma, Wenjun",
title="A Quantitative Spectra Analysis Framework Combining Mixup and Band Attention for Predicting Soluble Solid Content of Blueberries",
booktitle="Knowledge Science, Engineering and Management",
year="2023",
publisher="Springer Nature Switzerland",
address="Cham",
pages="366--373",
isbn="978-3-031-40292-0"
}

mba-2023's People

Contributors

li-zk 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.