landmarkdiff 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- landmarkdiff-0.2.3/CHANGELOG.md +90 -0
- landmarkdiff-0.2.3/CITATION.cff +18 -0
- landmarkdiff-0.2.3/LICENSE +21 -0
- landmarkdiff-0.2.3/MANIFEST.in +9 -0
- landmarkdiff-0.2.3/PKG-INFO +1173 -0
- landmarkdiff-0.2.3/README.md +1108 -0
- landmarkdiff-0.2.3/landmarkdiff/__init__.py +40 -0
- landmarkdiff-0.2.3/landmarkdiff/__main__.py +207 -0
- landmarkdiff-0.2.3/landmarkdiff/api_client.py +316 -0
- landmarkdiff-0.2.3/landmarkdiff/arcface_torch.py +583 -0
- landmarkdiff-0.2.3/landmarkdiff/audit.py +338 -0
- landmarkdiff-0.2.3/landmarkdiff/augmentation.py +293 -0
- landmarkdiff-0.2.3/landmarkdiff/benchmark.py +213 -0
- landmarkdiff-0.2.3/landmarkdiff/checkpoint_manager.py +361 -0
- landmarkdiff-0.2.3/landmarkdiff/cli.py +252 -0
- landmarkdiff-0.2.3/landmarkdiff/clinical.py +223 -0
- landmarkdiff-0.2.3/landmarkdiff/conditioning.py +278 -0
- landmarkdiff-0.2.3/landmarkdiff/config.py +358 -0
- landmarkdiff-0.2.3/landmarkdiff/curriculum.py +191 -0
- landmarkdiff-0.2.3/landmarkdiff/data.py +405 -0
- landmarkdiff-0.2.3/landmarkdiff/data_version.py +301 -0
- landmarkdiff-0.2.3/landmarkdiff/displacement_model.py +745 -0
- landmarkdiff-0.2.3/landmarkdiff/ensemble.py +330 -0
- landmarkdiff-0.2.3/landmarkdiff/evaluation.py +415 -0
- landmarkdiff-0.2.3/landmarkdiff/experiment_tracker.py +231 -0
- landmarkdiff-0.2.3/landmarkdiff/face_verifier.py +947 -0
- landmarkdiff-0.2.3/landmarkdiff/fid.py +244 -0
- landmarkdiff-0.2.3/landmarkdiff/hyperparam.py +347 -0
- landmarkdiff-0.2.3/landmarkdiff/inference.py +754 -0
- landmarkdiff-0.2.3/landmarkdiff/landmarks.py +432 -0
- landmarkdiff-0.2.3/landmarkdiff/log.py +90 -0
- landmarkdiff-0.2.3/landmarkdiff/losses.py +348 -0
- landmarkdiff-0.2.3/landmarkdiff/manipulation.py +651 -0
- landmarkdiff-0.2.3/landmarkdiff/masking.py +316 -0
- landmarkdiff-0.2.3/landmarkdiff/metrics_agg.py +313 -0
- landmarkdiff-0.2.3/landmarkdiff/metrics_viz.py +464 -0
- landmarkdiff-0.2.3/landmarkdiff/model_registry.py +362 -0
- landmarkdiff-0.2.3/landmarkdiff/morphometry.py +342 -0
- landmarkdiff-0.2.3/landmarkdiff/postprocess.py +600 -0
- landmarkdiff-0.2.3/landmarkdiff/py.typed +0 -0
- landmarkdiff-0.2.3/landmarkdiff/safety.py +395 -0
- landmarkdiff-0.2.3/landmarkdiff/synthetic/__init__.py +23 -0
- landmarkdiff-0.2.3/landmarkdiff/synthetic/augmentation.py +188 -0
- landmarkdiff-0.2.3/landmarkdiff/synthetic/pair_generator.py +208 -0
- landmarkdiff-0.2.3/landmarkdiff/synthetic/tps_warp.py +273 -0
- landmarkdiff-0.2.3/landmarkdiff/validation.py +324 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/PKG-INFO +1173 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/SOURCES.txt +52 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/dependency_links.txt +1 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/entry_points.txt +2 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/requires.txt +43 -0
- landmarkdiff-0.2.3/landmarkdiff.egg-info/top_level.txt +1 -0
- landmarkdiff-0.2.3/pyproject.toml +245 -0
- landmarkdiff-0.2.3/setup.cfg +4 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.3] - 2026-03-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `NasalMorphometry` module for computing nasal ratios from Varghaei et al. (2025)
|
|
12
|
+
- `FacialSymmetry` bilateral symmetry scoring via KDTree-based matching
|
|
13
|
+
- `FaceLandmarks.pixel_coords_at()` for getting coordinates at any resolution
|
|
14
|
+
- `FaceLandmarks.rescale()` for creating resolution-adjusted copies
|
|
15
|
+
- `collect_instagram_data.py` script for curating public-domain training pairs
|
|
16
|
+
- Competitive landscape table in README (9-method comparison)
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `DisplacementModel.load()` now raises `ValueError` on corrupted/empty `.npz` files instead of returning zero-initialized model
|
|
20
|
+
- `get_face_embedding()` guards against near-zero ArcFace embeddings from occluded faces, preventing NaN similarity scores
|
|
21
|
+
- CUDA OOM during inference now raises an informative `RuntimeError` instead of hanging
|
|
22
|
+
- Remaining `print()` calls migrated to `logging` module
|
|
23
|
+
|
|
24
|
+
## [0.2.2] - 2026-03-14
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- LCM-LoRA fast inference mode in `inference.py` (latent consistency distillation, 4-step generation)
|
|
28
|
+
- Per-procedure validation pass with anatomy-aware rejection logic
|
|
29
|
+
- 26 new utility scripts synced from upstream (evaluation, visualization, paper figure generation)
|
|
30
|
+
- GitHub wiki expanded to 15 pages (procedure guides, training walkthrough, evaluation reference)
|
|
31
|
+
- Real demo faces in HF Space replacing placeholder images
|
|
32
|
+
- `build_qualitative_grid.py` -- multi-procedure qualitative comparison grid
|
|
33
|
+
- `generate_comparison_figure.py` -- side-by-side method comparison figure
|
|
34
|
+
- `landmark_accuracy_heatmap.py` -- per-landmark error heatmap for paper
|
|
35
|
+
- `visualize_attention.py` -- ControlNet cross-attention map visualization
|
|
36
|
+
- `visualize_latent_space.py` -- UMAP/PCA projection of latent codes by procedure
|
|
37
|
+
- `progressive_denoising.py` -- denoising trajectory strip for supplementary
|
|
38
|
+
- `intensity_sweep.py` -- full intensity sweep grid (0-100%) for all procedures
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- bf16 is now the default training precision (was fp32)
|
|
42
|
+
- Loss weight tuning: landmark weight 0.1, identity weight 0.05, perceptual weight 0.1 (defaults locked)
|
|
43
|
+
- HF Space UI simplified -- single-panel layout, procedure selector cleaned up
|
|
44
|
+
- CI workflow updated: pinned action versions, pip caching, per-job concurrency control
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
- Inference pipeline dtype mismatch when switching between fp16 and bf16 checkpoints
|
|
48
|
+
- Per-procedure validation was silently skipped when `--validate` flag was absent
|
|
49
|
+
|
|
50
|
+
## [0.2.0] - 2025-06-01
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
- Brow lift procedure preset (PR #35, thanks @Deepak8858)
|
|
54
|
+
- Mentoplasty procedure preset (PR #36, thanks @P-r-e-m-i-u-m)
|
|
55
|
+
- Data-driven displacement model from real surgical data
|
|
56
|
+
- Clinical flags for edge case handling
|
|
57
|
+
- DisplacementModel class for fitted surgical displacements
|
|
58
|
+
- 6 new example scripts (evaluation, visualization, batch processing)
|
|
59
|
+
- Comprehensive API documentation
|
|
60
|
+
- GitHub wiki with 11 pages
|
|
61
|
+
- 200+ tracked issues for roadmap
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
- Intensity parameter standardized to 0-100 scale
|
|
65
|
+
- Post-processing pipeline order: CodeFormer -> Real-ESRGAN -> histogram match -> sharpen -> blend
|
|
66
|
+
- Improved mask compositing with LAB skin tone matching
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- SLURM config no longer hardcodes account names
|
|
70
|
+
- API docs now match actual code signatures
|
|
71
|
+
- Broken links in documentation index
|
|
72
|
+
|
|
73
|
+
## [0.1.0] - 2024-12-15
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
- Initial release
|
|
77
|
+
- 4 procedures: rhinoplasty, blepharoplasty, rhytidectomy, orthognathic
|
|
78
|
+
- 4 inference modes: tps, img2img, controlnet, controlnet_ip
|
|
79
|
+
- MediaPipe 478-point face mesh landmark extraction
|
|
80
|
+
- Gaussian RBF landmark deformation
|
|
81
|
+
- ControlNet conditioning (CrucibleAI/ControlNetMediaPipeFace)
|
|
82
|
+
- Post-processing: CodeFormer, Real-ESRGAN, histogram matching
|
|
83
|
+
- ArcFace identity preservation check
|
|
84
|
+
- Gradio web demo
|
|
85
|
+
- CLI interface
|
|
86
|
+
|
|
87
|
+
[0.2.3]: https://github.com/dreamlessx/LandmarkDiff-public/compare/v0.2.2...HEAD
|
|
88
|
+
[0.2.2]: https://github.com/dreamlessx/LandmarkDiff-public/compare/v0.2.0...v0.2.2
|
|
89
|
+
[0.2.0]: https://github.com/dreamlessx/LandmarkDiff-public/compare/v0.1.0...v0.2.0
|
|
90
|
+
[0.1.0]: https://github.com/dreamlessx/LandmarkDiff-public/releases/tag/v0.1.0
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "LandmarkDiff: Anatomically-Conditioned Facial Surgery Outcome Prediction"
|
|
3
|
+
message: "If you use this software, please cite it as below."
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- alias: dreamlessx
|
|
7
|
+
repository-code: "https://github.com/dreamlessx/LandmarkDiff-public"
|
|
8
|
+
url: "https://github.com/dreamlessx/LandmarkDiff-public"
|
|
9
|
+
license: MIT
|
|
10
|
+
version: 0.2.3
|
|
11
|
+
date-released: "2026-03-15"
|
|
12
|
+
keywords:
|
|
13
|
+
- facial-surgery
|
|
14
|
+
- landmark-deformation
|
|
15
|
+
- controlnet
|
|
16
|
+
- thin-plate-spline
|
|
17
|
+
- mediapipe
|
|
18
|
+
- stable-diffusion
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dreamlessx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|