README.md

Seismic Image Segmentation

This repository presents a segmentation approach for seismic images, based on the fine-tuning of the Segment Anything Model (SAM). The project adapts SAM using the IA3 adapter and leverages combined prompt strategies (bounding box + points) for accurate automatic segmentation of geological structures (e.g., paleovres, reefs). The method achieves improvements in key segmentation metrics (Dice up to 0.60, IoU gain) and maintains real-time feasibility (~1.35 FPS), making it suitable for industrial and research use.

Original paper


🔑 Key Features

🧠 Adapted SAM Model

Utilizes the pre-trained facebook/sam-vit-huge with an IA3 adapter (reducing trainable parameters by ~10%) for efficient seismic segmentation.

🎯 Combined Prompt Strategy

Supports multiple prompt types, including:

  • Points
  • Circles
  • Bounding boxes
  • Combined (e.g., bounding box + points/circles)
    to enhance segmentation precision and generalization.

🛠️ Data Pipeline

Processes seismic datasets through:

  • 2D slice conversion to RGB
  • Intensity normalization
  • Binary mask generation

Included datasets:

  • Real-world data: Salt2D
  • Synthetic data: sabamrine, paleokart

🧪 Experiment Management

  • Managed via Hydra for flexible experiment configuration
  • Integrated with ClearML for tracking, reproducibility, and hyperparameter optimization

🚀 Training & Inference Pipeline

Comprehensive pipelines for:

  • Training, validation, testing
  • Automated reporting of IoU and Dice metrics

🧰 Installation

Clone the Repository:

git clone <repository_url>
cd seismic_segmentation

Install Dependencies:

Use a virtual environment before installation.

pip install -r requirements.txt

Download SAM Weights (Optional):

Refer to the segment-anything repository for model checkpoints.


⚙️ Configuration

YAML-Based Setup

Experiment configurations reside in conf/config.yaml and include:

  • Model Settings:
    Model type, adapter (IA3 or LoRA), layer freezing options

  • Training Hyperparameters:
    Epochs, learning rate, batch size, checkpointing frequency

  • Dataset Settings:
    Paths to seismic images and masks, input shape, binary format

  • Prompt Settings:
    Prompt type (bbox+points, etc.), number of points, bbox noise


🔐 ClearML Integration

Set your ClearML credentials via environment variables:

Path: experiments/.env.example

CLEARML_WEB_HOST=https://app.clear.ml/
CLEARML_API_HOST=https://api.clear.ml
CLEARML_FILES_HOST=https://files.clear.ml
CLEARML_API_ACCESS_KEY=your_access_key
CLEARML_API_SECRET_KEY=your_secret_key

Rename the file to .env or set the variables in your shell.


🏃 Running the Training

To launch training:

./run_train.sh

For multi-run experiments:

./run_train.sh --multirun

📁 Data Structure

/data
│
├── Salt2d       # Real-world 2D seismic slices
├── sabamrine    # Synthetic 3D volumes with paleovres
└── paleokart    # Synthetic seismic structures (paleokarts)

🗂 Project Layout

conf/           # Experiment configurations (Hydra)
experiments/    # Training logic and scripts
data/           # Datasets and annotations
run_train.sh    # Entry script for training runs

📌 Notes

  • Backbone Model: facebook/sam-vit-huge
  • Adapter: IA3 (efficient fine-tuning)
  • Tools: Hydra + ClearML for reproducible ML experiments
  • Prompt Modes: bbox, points, hybrid configurations

🤝 Acknowledgements

This project has benefited from open-source contributions and collaborative experimentation across geoscience and AI communities. We thank everyone who helped shape and test this solution.

  • petrovdenees
  • vladimir6567
  • bc-ru
  • unlikexd
  • andreyvostretsov

For technical inquiries or usage questions, refer to the documentation or reach out via the repository’s issue tracker.

Описание
Конвейеры
0 успешных
0 с ошибкой
Разработчики