Repository: opencv
Issue: cv2.error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'getLayerData'
Labels: incomplete

### System Information

Preprocessing [Image 1/2]:  50%|█████     | 1/2 [00:00<00:00,  2.64it/s]
Error completing request
Arguments: ('task(tt0xcx2esd7dqb1)', '/data/lora_train_in/azuki/', '/data/lora_train_out/azuki/', 512, 512, 'ignore', False, False, False, False, True, 0.5, 0.2, True, 0.9, 0.15, 0.5, False, False, 384, 768, 4096, 409600, 'Maximize area', 0.1) {}
Traceback (most recent call last):
  File "/stable-diffusion-webui/modules/call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/stable-diffusion-webui/modules/textual_inversion/ui.py", line 19, in preprocess
    modules.textual_inversion.preprocess.preprocess(*args)
  File "/stable-diffusion-webui/modules/textual_inversion/preprocess.py", line 18, in preprocess
    preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold)
  File "/stable-diffusion-webui/modules/textual_inversion/preprocess.py", line 212, in preprocess_work
    for focal in autocrop.crop_image(img, autocrop_settings):
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 32, in crop_image
    focus = focal_point(im_debug, settings)
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 75, in focal_point
    face_points = image_face_points(im, settings) if settings.face_points_weight > 0 else []
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 150, in image_face_points
    faces = detector.detect(np.array(im))
cv2.error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'getLayerData'

the opencv-python version:
root@0e81fb951e5a:/stable-diffusion-webui# pip show opencv-python
Name: opencv-python
Version: 4.8.0.74
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/opencv/opencv-python

### Detailed description

cv2.error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'getLayerData'

### Steps to reproduce

Preprocessing [Image 1/2]:  50%|█████     | 1/2 [00:00<00:00,  2.64it/s]
Error completing request
Arguments: ('task(tt0xcx2esd7dqb1)', '/data/lora_train_in/azuki/', '/data/lora_train_out/azuki/', 512, 512, 'ignore', False, False, False, False, True, 0.5, 0.2, True, 0.9, 0.15, 0.5, False, False, 384, 768, 4096, 409600, 'Maximize area', 0.1) {}
Traceback (most recent call last):
  File "/stable-diffusion-webui/modules/call_queue.py", line 57, in f
    res = list(func(*args, **kwargs))
  File "/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/stable-diffusion-webui/modules/textual_inversion/ui.py", line 19, in preprocess
    modules.textual_inversion.preprocess.preprocess(*args)
  File "/stable-diffusion-webui/modules/textual_inversion/preprocess.py", line 18, in preprocess
    preprocess_work(process_src, process_dst, process_width, process_height, preprocess_txt_action, process_keep_original_size, process_flip, process_split, process_caption, process_caption_deepbooru, split_threshold, overlap_ratio, process_focal_crop, process_focal_crop_face_weight, process_focal_crop_entropy_weight, process_focal_crop_edges_weight, process_focal_crop_debug, process_multicrop, process_multicrop_mindim, process_multicrop_maxdim, process_multicrop_minarea, process_multicrop_maxarea, process_multicrop_objective, process_multicrop_threshold)
  File "/stable-diffusion-webui/modules/textual_inversion/preprocess.py", line 212, in preprocess_work
    for focal in autocrop.crop_image(img, autocrop_settings):
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 32, in crop_image
    focus = focal_point(im_debug, settings)
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 75, in focal_point
    face_points = image_face_points(im, settings) if settings.face_points_weight > 0 else []
  File "/stable-diffusion-webui/modules/textual_inversion/autocrop.py", line 150, in image_face_points
    faces = detector.detect(np.array(im))
cv2.error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/net_impl.cpp:279: error: (-204:Requested object was not found) Layer with requested id=-1 not found in function 'getLayerData'

### Issue submission checklist

- [X] I report the issue, it's not a question
- [ ] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)