This guide will help you get started with LineamentLearning in 5 minutes.
# Clone repository
git clone https://github.com/RichardScottOZ/LineamentLearning.git
cd LineamentLearning
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -e .Your data should be in MATLAB .mat format with the following structure:
I1, I2, ..., I8: Input layers (8 geophysical datasets)output: Ground truth lineamentsmask: Valid data regiontrain_mask: Training regiontest_mask: Testing regionDEGREES: Lineament orientations
Create my_config.json:
{
"model": {
"architecture": "RotateNet",
"window_size": 45,
"batch_size": 32,
"epochs": 50,
"learning_rate": 0.001
},
"data": {
"train_ratio": 0.7,
"val_ratio": 0.15,
"test_ratio": 0.15
}
}lineament-train \
--config my_config.json \
--data ./Dataset/Australia/Rotations/Australia_strip.mat \
--output ./my_first_model \
--tensorboardMonitor training with TensorBoard:
tensorboard --logdir ./my_first_model/logslineament-predict \
--model ./my_first_model/best_model.h5 \
--data ./Dataset/test_data.mat \
--output ./results \
--visualizefrom config import Config
from model_modern import build_model
# Create and configure model
config = Config()
config.model.architecture = 'UNet'
model = build_model(config)
# View model architecture
model.summary()lineament-train \
--architecture UNet \
--window-size 64 \
--data ./data/train.mat \
--output ./models/unetlineament-train \
--architecture ResNet \
--window-size 64 \
--epochs 100 \
--data ./data/train.mat \
--output ./models/resnetSolution: Reduce batch size
lineament-train --batch-size 16 ...Solutions:
- Enable GPU:
--gpu 0 - Use mixed precision: Add to config:
"use_mixed_precision": true - Reduce window size:
--window-size 32
Solutions:
- Check data quality
- Adjust learning rate:
--learning-rate 0.0001 - Increase epochs:
--epochs 200 - Try different architecture:
--architecture UNet
- Read Full Documentation: See README.md
- Explore Examples: Check
examples/directory - Customize Model: Edit
model_modern.py - Optimize Hyperparameters: Experiment with config
- Visualize Results: Use TensorBoard and visualization tools
- Data Quality: Ensure clean, properly labeled data
- Data Augmentation: Enable augmentation for small datasets
- Early Stopping: Use early stopping to prevent overfitting
- Model Selection: Try multiple architectures
- Hyperparameter Tuning: Experiment with learning rates and batch sizes
- Ensemble Methods: Combine multiple models for better results
- Documentation: README.md, CHANGELOG.md
- Issues: https://github.com/RichardScottOZ/LineamentLearning/issues
- Original Thesis: http://hdl.handle.net/2429/68438