Spaces:
Running
Running
Update landmarkdiff/curriculum.py to v0.3.2
Browse files
landmarkdiff/curriculum.py
CHANGED
|
@@ -104,10 +104,10 @@ class ProcedureCurriculum:
|
|
| 104 |
|
| 105 |
# Difficulty ranking (0=easiest, 1=hardest)
|
| 106 |
DEFAULT_PROCEDURE_DIFFICULTY = {
|
| 107 |
-
"blepharoplasty": 0.3,
|
| 108 |
-
"rhinoplasty": 0.5,
|
| 109 |
-
"rhytidectomy": 0.7,
|
| 110 |
-
"orthognathic": 0.9,
|
| 111 |
}
|
| 112 |
|
| 113 |
def __init__(
|
|
@@ -137,7 +137,10 @@ class ProcedureCurriculum:
|
|
| 137 |
|
| 138 |
def get_procedure_weights(self, step: int) -> dict[str, float]:
|
| 139 |
"""Get all procedure weights at the given step."""
|
| 140 |
-
return {
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
|
| 143 |
def compute_sample_difficulty(
|
|
@@ -171,7 +174,7 @@ def compute_sample_difficulty(
|
|
| 171 |
source_bonus = {
|
| 172 |
"synthetic": 0.0,
|
| 173 |
"synthetic_v3": 0.1, # realistic displacements slightly harder
|
| 174 |
-
"real": 0.2,
|
| 175 |
"augmented": 0.0,
|
| 176 |
}
|
| 177 |
|
|
|
|
| 104 |
|
| 105 |
# Difficulty ranking (0=easiest, 1=hardest)
|
| 106 |
DEFAULT_PROCEDURE_DIFFICULTY = {
|
| 107 |
+
"blepharoplasty": 0.3, # small, localized changes
|
| 108 |
+
"rhinoplasty": 0.5, # moderate, central face
|
| 109 |
+
"rhytidectomy": 0.7, # large, affects face shape
|
| 110 |
+
"orthognathic": 0.9, # largest deformations
|
| 111 |
}
|
| 112 |
|
| 113 |
def __init__(
|
|
|
|
| 137 |
|
| 138 |
def get_procedure_weights(self, step: int) -> dict[str, float]:
|
| 139 |
"""Get all procedure weights at the given step."""
|
| 140 |
+
return {
|
| 141 |
+
proc: self.get_weight(step, proc)
|
| 142 |
+
for proc in self.proc_difficulty
|
| 143 |
+
}
|
| 144 |
|
| 145 |
|
| 146 |
def compute_sample_difficulty(
|
|
|
|
| 174 |
source_bonus = {
|
| 175 |
"synthetic": 0.0,
|
| 176 |
"synthetic_v3": 0.1, # realistic displacements slightly harder
|
| 177 |
+
"real": 0.2, # real data hardest
|
| 178 |
"augmented": 0.0,
|
| 179 |
}
|
| 180 |
|