-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
248 lines (234 loc) · 8.36 KB
/
pyproject.toml
File metadata and controls
248 lines (234 loc) · 8.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
[build-system]
requires = ["setuptools>=69.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "landmarkdiff"
dynamic = ["version"]
description = "Anatomically-conditioned latent diffusion for facial surgery outcome prediction from standard clinical photography"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
authors = [{name = "dreamlessx", email = "dreamlessx@users.noreply.github.com"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
]
dependencies = [
"torch>=2.1.0",
"diffusers>=0.27.0",
"transformers>=4.38.0",
"accelerate>=0.27.0",
"safetensors>=0.4.0",
"mediapipe>=0.10.9",
"opencv-python>=4.9.0",
"numpy>=1.26.0",
"Pillow>=10.0.0",
"pyyaml>=6.0",
]
[project.optional-dependencies]
train = [
"wandb>=0.16.0",
"webdataset>=0.2.0",
"deepspeed>=0.13.0",
"lpips>=0.1.4",
"insightface>=0.7.3",
"onnxruntime-gpu>=1.17.0",
]
eval = [
"torch-fidelity>=0.3.0",
"lpips>=0.1.4",
"scikit-image>=0.22.0",
"scipy>=1.10.0",
]
app = [
"gradio>=4.15.0",
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"ruff>=0.2.0",
"mypy>=1.8.0",
"types-PyYAML>=6.0.0",
"types-requests>=2.31.0",
"scipy>=1.10.0",
"hypothesis>=6.0.0",
]
gpu = [
"torch>=2.1.0",
"xformers>=0.0.23",
"triton>=2.1.0",
]
[project.urls]
Homepage = "https://github.com/dreamlessx/LandmarkDiff-public"
Repository = "https://github.com/dreamlessx/LandmarkDiff-public"
Documentation = "https://landmarkdiff.readthedocs.io"
Issues = "https://github.com/dreamlessx/LandmarkDiff-public/issues"
Changelog = "https://github.com/dreamlessx/LandmarkDiff-public/blob/main/CHANGELOG.md"
[project.scripts]
landmarkdiff = "landmarkdiff.__main__:main"
[tool.setuptools.dynamic]
version = {attr = "landmarkdiff.__version__"}
[tool.setuptools.packages.find]
include = ["landmarkdiff*"]
[tool.setuptools.package-data]
landmarkdiff = ["py.typed"]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "UP", "B", "SIM", "RUF", "PIE", "W"]
ignore = [
"B905", # zip-without-explicit-strict (strict=False is the default, adds noise)
"N812", # lowercase-imported-as-non-lowercase (common with torch.nn.functional as F)
"SIM300", # yoda-conditions (valid in range-check assertions)
"RUF001", # ambiguous-unicode-character-string (false positives in docstrings)
"RUF003", # ambiguous-unicode-character-comment (false positives in comments)
"RUF005", # collection-literal-concatenation (["a"] + list is readable enough)
"RUF012", # mutable-class-default (conflicts with dataclass patterns)
"RUF059", # unused-unpacked-variable (very noisy in numeric/test code)
]
[tool.ruff.lint.per-file-ignores]
"landmarkdiff/arcface_torch.py" = ["N806", "N802", "E741"]
"landmarkdiff/augmentation.py" = ["N806", "N803"]
"landmarkdiff/audit.py" = ["E501"]
"landmarkdiff/evaluation.py" = ["N806"]
"landmarkdiff/landmarks.py" = ["N806"]
"landmarkdiff/losses.py" = ["N806", "E741"]
"landmarkdiff/synthetic/tps_warp.py" = ["N806"]
"landmarkdiff/synthetic/augmentation.py" = ["N806"]
"scripts/analyze_training_run.py" = ["E501"]
"scripts/train_controlnet.py" = ["N806", "N803", "N817", "E402", "E501", "B905", "SIM102"]
"scripts/training_dashboard.py" = ["E501"]
"scripts/dry_run_training.py" = ["N806", "E402", "F401"]
"scripts/augment_pairs.py" = ["N806"]
"scripts/benchmark_quality.py" = ["E501"]
"scripts/check_environment.py" = ["E501"]
"scripts/clean_data.py" = ["E402", "E501"]
"scripts/compare_outputs.py" = ["E402"]
"scripts/evaluate_on_hda.py" = ["E402"]
"scripts/monitor_training.py" = ["E501", "B007"]
"scripts/plot_training_curves.py" = ["E402", "E501"]
"scripts/process_hda_database.py" = ["E402"]
"scripts/run_evaluation.py" = ["E402"]
"scripts/augmentation_preview.py" = ["E402"]
"scripts/batch_inference.py" = ["E501"]
"scripts/clinical_demo.py" = ["E402", "E501"]
"scripts/compare_models.py" = ["E402", "E501"]
"scripts/extract_displacements.py" = ["E402"]
"scripts/generate_paper_tables.py" = ["E501"]
"scripts/launch_training.py" = ["E501"]
"scripts/post_training_pipeline.py" = ["E402", "E501"]
"scripts/preflight_training.py" = ["E402", "E501"]
"scripts/reconstruct_metadata.py" = ["E402", "E501"]
"scripts/submit_job.py" = ["E402", "N802"]
"scripts/validate_config.py" = ["E402", "SIM102"]
"scripts/validate_paper.py" = ["E741"]
"scripts/ablation_study.py" = ["B905", "F841", "SIM108"]
"scripts/analyze_training_data.py" = ["E501", "N806", "SIM102"]
"scripts/api_server.py" = ["B008", "B904"]
"scripts/build_training_dataset.py" = ["N806"]
"scripts/compute_baselines_hda.py" = ["F841", "N806"]
"scripts/compute_baselines.py" = ["E402", "F841"]
"scripts/distill_lcm.py" = ["B905"]
"scripts/evaluate_checkpoint.py" = ["E402"]
"scripts/generate_paper_figures.py" = ["B905", "E402", "E741", "F841"]
"scripts/generate_realistic_pairs.py" = ["E402", "SIM108"]
"scripts/hp_search.py" = ["B905"]
"scripts/hyperparameter_sensitivity.py" = ["B905", "E501", "SIM108"]
"scripts/lr_finder.py" = ["E741"]
"scripts/profile_pipeline.py" = ["B007", "F841"]
"scripts/project_status.py" = ["SIM105", "SIM115"]
"scripts/run_ablation.py" = ["B023", "E501", "E731"]
"scripts/run_tps_ablation.py" = ["B905"]
"scripts/score_checkpoints.py" = ["E501"]
"scripts/status_report.py" = ["SIM105", "SIM115"]
"scripts/verify_dataset.py" = ["E501", "SIM102"]
"scripts/visualize_displacements.py" = ["B905", "E402", "F841"]
"scripts/visualize_hda_data.py" = ["B905", "F841"]
"scripts/analyze_training.py" = ["E741"]
"scripts/cross_procedure_eval.py" = ["E501"]
"scripts/demo_server.py" = ["E501"]
"scripts/ensemble_inference.py" = ["B007", "E402", "E501"]
"scripts/generate_model_card.py" = ["E501"]
"scripts/generate_supplementary.py" = ["E501"]
"scripts/intensity_sweep.py" = ["E402"]
"scripts/landmark_accuracy_heatmap.py" = ["SIM105"]
"scripts/multi_seed_eval.py" = ["E501"]
"scripts/run_table2_ablation.py" = ["E402"]
"scripts/statistical_tests.py" = ["E402"]
"scripts/uncertainty_estimation.py" = ["B007"]
"scripts/update_paper_tables.py" = ["B007", "E501"]
"scripts/visualize_attention.py" = ["B023"]
"scripts/visualize_latent_space.py" = ["N806"]
"tests/test_exhaustive.py" = ["N806"]
"tests/test_deep_dive.py" = ["N806", "B017"]
"tests/test_augmentation.py" = ["N806"]
"tests/test_config_augmentation.py" = ["N806", "N802"]
"tests/test_training_integration.py" = ["N806", "E501"]
"tests/test_pipeline_tools.py" = ["E501"]
"tests/test_process_hda.py" = ["E402"]
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
check_untyped_defs = false
explicit_package_bases = true
ignore_missing_imports = true
exclude = [
"scripts/batch_inference.py",
"scripts/benchmark_inference.py",
"examples/*.ipynb",
]
[[tool.mypy.overrides]]
module = [
"landmarkdiff.api_client",
"landmarkdiff.arcface_torch",
"landmarkdiff.audit",
"landmarkdiff.augmentation",
"landmarkdiff.benchmark",
"landmarkdiff.checkpoint_manager",
"landmarkdiff.cli",
"landmarkdiff.clinical",
"landmarkdiff.conditioning",
"landmarkdiff.config",
"landmarkdiff.curriculum",
"landmarkdiff.data",
"landmarkdiff.data_version",
"landmarkdiff.displacement_model",
"landmarkdiff.ensemble",
"landmarkdiff.evaluation",
"landmarkdiff.experiment_tracker",
"landmarkdiff.face_verifier",
"landmarkdiff.fid",
"landmarkdiff.hyperparam",
"landmarkdiff.inference",
"landmarkdiff.landmarks",
"landmarkdiff.log",
"landmarkdiff.losses",
"landmarkdiff.manipulation",
"landmarkdiff.masking",
"landmarkdiff.metrics_agg",
"landmarkdiff.metrics_viz",
"landmarkdiff.model_registry",
"landmarkdiff.morphometry",
"landmarkdiff.postprocess",
"landmarkdiff.safety",
"landmarkdiff.synthetic.*",
"landmarkdiff.validation",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = ["scripts.*"]
ignore_errors = true