hifu-mipnet

A Deep Learning Network for Microplastic Identification Using High-Frequency Ultrasound

https://github.com/naviiidz/hifu-mipnet

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A Deep Learning Network for Microplastic Identification Using High-Frequency Ultrasound

Basic Info
  • Host: GitHub
  • Owner: naviiidz
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 33.2 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Created 9 months ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

HiFU-MiPNet: High-Frequency Ultrasound Material Identification and Size Estimation Pipeline

DOI

A deep learning-based system for material identification of microspheres using high-frequency ultrasound signals. This project implements both traditional machine learning and deep learning approaches for material classification.

Project Structure

HiFU-MiPNet/ ├── data/ # Dataset directory ├── material_classification_ml/ # Traditional ML implementation │ ├── config.yaml # Configuration file │ ├── train_ml.py # Training script │ ├── feature_extraction.py # Feature extraction utilities │ └── output/ # Training outputs and results ├── material_classification_cnn/ # CNN-based implementation │ ├── config.py # Configuration settings │ ├── model.py # CNN model architecture │ ├── train.py # Training script │ ├── predict.py # Prediction script │ ├── preprocessing.py # Data preprocessing utilities │ ├── peak_extract.py # Peak extraction utilities │ ├── visualize.py # Visualization tools │ └── final_model.h5 # Trained model weights ├── size_estimation_mlp/ # Size estimation implementation │ ├── config.yaml # Configuration settings │ ├── train_size_model.py # Training script │ ├── predict_mat_size.py # Combined material and size prediction │ ├── size_model_arch.py # MLP model architecture │ ├── util.py # Utility functions ├── manual_labeling/ # Manual labeling tools │ ├── manual_label.py # Main labeling script │ ├── size_pred_labeling.py # Size prediction labeling │ ├── load_data.py # Data loading utilities │ ├── plot.py # Visualization tools ├── LICENSE # MIT License └── requirements.txt # Project dependencies

Data

The dataset can be downloaded from Google Drive: Download Dataset

After downloading, place the data files in the data/ directory.

Features

  • Multiple classification approaches:
    • Traditional Machine Learning (ML) with feature extraction
    • Deep Learning (CNN) with raw signal processing
  • Comprehensive signal processing pipeline
  • Peak extraction and analysis
  • Material classification
  • Size estimation capabilities
  • Visualization tools for analysis
  • Model evaluation metrics

Requirements

For ML Implementation

  • Python 3.8+
  • scikit-learn
  • NumPy
  • Pandas
  • SciPy
  • Matplotlib
  • PyYAML

For CNN Implementation

  • Python 3.8+
  • TensorFlow 2.x
  • NumPy
  • Pandas
  • SciPy
  • Matplotlib
  • scikit-learn

Installation

  1. Clone the repository: bash git clone https://github.com/naviiidz/HiFU-MiPNet.git cd HiFU-MiPNet

  2. Install dependencies: ```bash

    For ML implementation

    pip install -r materialclassificationml/requirements.txt

# For CNN implementation and size estimation pip install -r materialclassificationcnn/requirements.txt ```

Usage

Traditional ML Approach

bash cd material_classification_ml python train_ml.py

CNN-based Approach

```bash cd materialclassificationcnn

Training

python train.py

Prediction

python predict.py ```

MLP Size Estimation

The size estimation component uses a Multi-Layer Perceptron (MLP) to predict the size of microspheres: - Trained on manually labeled size data - Uses bounding box information for prediction - Can be used in combination with material classification

``` cd sizeestimationmlp

Training

python trainsizemodel.py

Prediction: Material + Size using bbox

python predictmatsize.py ```

Manual Labeling

The manual labeling component provides tools for: - Labeling ultrasound signals for material classification - Annotating size information for training - Visualizing and validating labels - Generating labeled datasets

``` cd manual_labeling

Start labeling process

python manuallabel.py --csvoutput OUTPUTNAME.csv --category DATASETCATEGORY --filename FILENAME ```

Data Processing

The system processes ultrasound signals through the following steps: 1. Signal preprocessing and normalization 2. Peak extraction and analysis 3. Feature extraction (for ML approach) 4. Balancing 5. Train/test splitting

Model Architectures

Traditional ML

  • Feature extraction from ultrasound signals
  • Various ML classifiers (configurable)
  • Cross-validation and hyperparameter tuning

CNN Model

  • 1D convolutional layers
  • Batch normalization
  • Max pooling
  • Dropout for regularization
  • Dense layers for classification

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Navid Zarrabi (Navid.Zarrabi@torontomu.ca)

Owner

  • Name: Navid
  • Login: naviiidz
  • Kind: user

PhD student in Robotics

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Zarrabi
    given-names: Navid
    orcid: https://orcid.org/0009-0002-2316-318X
title: naviiidz/HiFU-MiPNet: Code release for microplastic classification and sizing via ultrasound
version: v1.0.0
date-released: 2025-07-17

GitHub Events

Total
  • Release event: 4
  • Delete event: 2
  • Push event: 3
  • Create event: 2
Last Year
  • Release event: 4
  • Delete event: 2
  • Push event: 3
  • Create event: 2

Dependencies

material_classification_cnn/requirements.txt pypi
  • matplotlib >=3.4.3
  • numpy >=1.19.5
  • pandas >=1.3.0
  • scikit-learn >=0.24.2
  • scipy >=1.7.0
  • seaborn >=0.11.2
  • tensorflow >=2.8.0
requirements.txt pypi
  • PyYAML >=6.0
  • h5py >=3.6.0
  • matplotlib >=3.4.0
  • numpy >=1.21.0
  • opencv-python >=4.5.0
  • pandas >=1.3.0
  • scikit-learn >=1.0.0
  • scipy >=1.7.0
  • tensorflow >=2.8.0
  • torch >=1.10.0
  • torchvision >=0.11.0
  • tqdm >=4.62.0