Spaces:
Running
Running
increased black ratio
Browse files
comic_panel_extractor/panel_segmentation.py
CHANGED
|
@@ -81,7 +81,7 @@ def extract_fully_white_panels(
|
|
| 81 |
total_pixels = region.image.size
|
| 82 |
black_ratio = black_pixel_count / total_pixels
|
| 83 |
|
| 84 |
-
if black_ratio > 0.
|
| 85 |
print(f"β Black ratio panel #{idx} β {round(black_ratio * 100, 2)}% black")
|
| 86 |
# Save debug info if desired
|
| 87 |
if save_debug:
|
|
|
|
| 81 |
total_pixels = region.image.size
|
| 82 |
black_ratio = black_pixel_count / total_pixels
|
| 83 |
|
| 84 |
+
if black_ratio > 0.05: # Allow up to 1% black pixels
|
| 85 |
print(f"β Black ratio panel #{idx} β {round(black_ratio * 100, 2)}% black")
|
| 86 |
# Save debug info if desired
|
| 87 |
if save_debug:
|