Spaces:
Sleeping
Sleeping
fix: add change ratio from pixel to cm
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ async def inference(file: UploadFile):
|
|
| 54 |
})
|
| 55 |
|
| 56 |
|
| 57 |
-
AVERAGE_TUMOR_VOLUME =
|
| 58 |
|
| 59 |
def calculate_sphere_volume(width, height):
|
| 60 |
"""
|
|
@@ -66,7 +66,7 @@ def calculate_sphere_volume(width, height):
|
|
| 66 |
diameter = (width + height) / 2
|
| 67 |
radius = diameter / 2
|
| 68 |
volume = (4/3) * math.pi * (radius ** 3)
|
| 69 |
-
return round(volume, 2)
|
| 70 |
except Exception as e:
|
| 71 |
print(f"Terjadi error: {e}")
|
| 72 |
return None
|
|
|
|
| 54 |
})
|
| 55 |
|
| 56 |
|
| 57 |
+
AVERAGE_TUMOR_VOLUME = 5751.46
|
| 58 |
|
| 59 |
def calculate_sphere_volume(width, height):
|
| 60 |
"""
|
|
|
|
| 66 |
diameter = (width + height) / 2
|
| 67 |
radius = diameter / 2
|
| 68 |
volume = (4/3) * math.pi * (radius ** 3)
|
| 69 |
+
return round(volume, 2) * 0.002274162
|
| 70 |
except Exception as e:
|
| 71 |
print(f"Terjadi error: {e}")
|
| 72 |
return None
|