Yolo face detection produce wrong Rects

Hello,
When I use Yolo as face detector, then the rect of face obtained by Yolo have negative values. When you have the 3/4 of the face on the image. Then the program crash on crop with rects. Coud you help, Thx

Code :
detector.InitInput(img);
auto rects = detector.detectFace(img.cols, img.rows);

cv::Mat img_crop = img(rect);

Solved. I use intersection of rectangles with &.