feat(SiaN): improve analyzing

This commit is contained in:
2026-04-05 12:50:28 +03:00
parent ec8b3ae20e
commit fa4c4b83ae
6 changed files with 1148 additions and 543 deletions

View File

@@ -18,7 +18,6 @@ from torch.utils.tensorboard import SummaryWriter
from torchvision import transforms, models
from tqdm import tqdm
# code: ./src/utils.py
# markdown
"""# Configuration
@@ -28,8 +27,8 @@ Global settings for:
- Model architecture options
Contains the `config` dictionary used across all modules."""
# code: ./src/utils.py
# code: ./src/dataloader.py
# markdown
"""## Dataset
@@ -42,8 +41,8 @@ Google/Yandex image pair loader with homography augmentation.
**Returns:**
- Batch dict with `google_img`, `yandex_img`, `homography_params`"""
# code: ./src/dataloader.py
# code: ./src/model.py
# markdown
"""## Model
@@ -58,8 +57,8 @@ Google/Yandex image pair loader with homography augmentation.
- Dual-branch CNN (Google + Yandex images)
- Shared backbone (configurable: resnet18/34/50)
- Fusion head with dropout regularization"""
# code: ./src/model.py
# code: ./src/train.py
# markdown
"""## Training
@@ -75,8 +74,8 @@ Google/Yandex image pair loader with homography augmentation.
**Checkpoint saving:**
- `best_model.pt` — lowest validation loss
- `checkpoint_epoch_N.pt` — periodic saves"""
# code: ./src/train.py
# code: ./src/analyze.py
# markdown
"""## Analysis
@@ -85,8 +84,8 @@ Visualization and evaluation tools:
- Training metrics plots (loss curves)
- Prediction visualization on sample images
- Error analysis and statistics"""
# code: ./src/analyze.py
# code: ./src/main.py
# markdown
"""## Main Pipeline
@@ -101,6 +100,7 @@ Executes the full training workflow:
- Model checkpoints in `runs/checkpoints/`
- TensorBoard logs in `runs/`
- Analysis plots"""
# code: ./src/main.py
# # shell:
# !zip artefacts.zip runs/gan_training/checkpoints/best_model.pt
# !zip artefacts.zip runs/checkpoints/best_model.pt runs/images/ runs/events.*