generated from Hazel/python-project
feat: started selecting bounding boxes
This commit is contained in:
parent
1dd387d980
commit
208f818e18
3
.gitignore
vendored
3
.gitignore
vendored
@ -160,4 +160,5 @@ cython_debug/
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
.venv
|
||||
assets/*
|
||||
assets/*
|
||||
*.pt
|
@ -266,7 +266,7 @@ def detect_human_parts(human: dict, face_padding: int = 20):
|
||||
cv2.imwrite(detected, image)
|
||||
|
||||
|
||||
def detect_humans(to_detect: str, crop_padding: int = 20, skip_detection_if_present: bool = True):
|
||||
def detect_humans(to_detect: str, crop_padding: int = 20, skip_detection_if_present: bool = False):
|
||||
_p = Path(to_detect)
|
||||
detected = str(_p.with_name(_p.stem + "_detected" + _p.suffix))
|
||||
boxes_file = str(_p.with_name(_p.stem + "_boxes.json"))
|
||||
@ -287,6 +287,9 @@ def detect_humans(to_detect: str, crop_padding: int = 20, skip_detection_if_pres
|
||||
|
||||
# Load image
|
||||
image = cv2.imread(to_detect)
|
||||
r = cv2.selectROI(image)
|
||||
print(r)
|
||||
|
||||
original_image = cv2.imread(to_detect)
|
||||
height, width, channels = image.shape
|
||||
|
||||
|
1
secure_pixelation/get_bounding_boxes.py
Normal file
1
secure_pixelation/get_bounding_boxes.py
Normal file
@ -0,0 +1 @@
|
||||
# https://learnopencv.com/how-to-select-a-bounding-box-roi-in-opencv-cpp-python/
|
Loading…
x
Reference in New Issue
Block a user