Draft
Add U-Net project for seismic data interpolation and reconstruction#1
Conversation
Agent-Logs-Url: https://github.com/babyyein/Test/sessions/4b2e55d1-c558-496d-8d3d-a375d75a18c7 Co-authored-by: babyyein <48505145+babyyein@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Find U-Net project for seismic data interpolation and reconstruction
Add U-Net project for seismic data interpolation and reconstruction
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a complete PyTorch U-Net pipeline for reconstructing missing traces in 2-D seismic sections from scratch on an otherwise empty repository.
Architecture
unet_model.py— Standard encoder-decoder U-Net with skip connections. 2-channel input (masked data + binary acquisition mask); 1-channel output (reconstructed section).dataset.py—SeismicDatasetsupporting.npyand SEG-Y inputs, random/regular subsampling masks, patch extraction, and per-section normalisation.utils.py—ReconstructionLoss(weighted L1 + MSE with configurable up-weighting on missing-trace locations), SNR/PSNR metrics, checkpoint helpers, visualisation.train.py— AdamW + cosine LR schedule training loop. Bundles a synthetic seismic data generator (dipping plane-wave events) so the pipeline runs end-to-end without real data.predict.py— Inference script with arbitrary-size input handling (reflect-pad → infer → crop), per-sample SNR/PSNR reporting, and optional side-by-side comparison figures.Quick usage
Tests
38 unit tests in
tests/test_seismic_unet.pycovering model shapes, gradient flow, mask generators, dataset I/O, loss behaviour, metrics, and padding round-trips.