mirror of
https://github.com/serengil/deepface.git
synced 2025-06-12 14:27:09 +00:00
Remove commented out code
This commit is contained in:
parent
b62d6cc9a0
commit
08710029e8
@ -104,18 +104,6 @@ def detect_faces(
|
|||||||
confidence = facial_area.confidence
|
confidence = facial_area.confidence
|
||||||
|
|
||||||
if expand_percentage > 0:
|
if expand_percentage > 0:
|
||||||
# Uncomment this if you want to :
|
|
||||||
# Expand the facial area to be extracted and recompute the height and width
|
|
||||||
# keeping the same aspect ratio and ensuring that the expanded area stays
|
|
||||||
# within img.shape limits
|
|
||||||
|
|
||||||
# current_area = w * h
|
|
||||||
# expanded_area = current_area + int((current_area * expand_percentage) / 100)
|
|
||||||
# scale_factor = math.sqrt(expanded_area / current_area)
|
|
||||||
# expanded_w = int(w * scale_factor)
|
|
||||||
# expanded_h = int(h * scale_factor)
|
|
||||||
|
|
||||||
# Or uncomment this if you want to :
|
|
||||||
# Expand the facial region height and width by the provided percentage
|
# Expand the facial region height and width by the provided percentage
|
||||||
# ensuring that the expanded region stays within img.shape limits
|
# ensuring that the expanded region stays within img.shape limits
|
||||||
expanded_w = w + int(w * expand_percentage / 100)
|
expanded_w = w + int(w * expand_percentage / 100)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user