meituan / YOLOv6

YOLOv6: a single-stage object detection framework dedicated to industrial applications.
GNU General Public License v3.0
5.71k stars 1.03k forks source link

YOLOv6-Face #832

Open oussaifi-majdi opened 1 year ago

oussaifi-majdi commented 1 year ago

Before Asking

Search before asking

Question

i tried to use YOLOv6-Face to detect faces in image but i can't find any example to use this model

Additional

No response

Chilicyy commented 1 year ago

Hi, you can switch to yolov6-face branch, and refer to readme. By the way, if you want to test yolov6-face n/s/m/l models, code from tag 0.3.1 should be used, while you want to test yolov6-face-lite models, code from tag 0.4.0 should be used. We're arranging the code to be compatible with both versions of the models lately.

oussaifi-majdi commented 1 year ago

thank you for the speed of the answer but I try to follow readme but I find this error AttributeError: Can't get attribute 'SimConv' on <module 'yolov6.layers.common' from 'C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\yolov6\layers\common.py'>

Chilicyy commented 1 year ago

hi, if you want to test yolov6-face n/s/m/l models, code from tag 0.3.1 should be used, while you want to test yolov6-face-lite models, code from tag 0.4.0 should be used. Just use git checkout 0.3.1 to switch to certain version.

oussaifi-majdi commented 1 year ago

PS C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6> python C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\tools\infer.py --weights C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\yolov6l_face.pt --source C:\Users\Lenovo\Desktop\widerface\images\valid --yaml C:\Users\Lenovo\Desktop\widerface\data.yaml --conf 0.02 --not-save-img --save-txt-widerface --name widerface_yolov6l Namespace(agnostic_nms=False, classes=None, conf_thres=0.02, device='0', half=False, hide_conf=False, hide_labels=False, img_size=[640, 640], iou_thres=0.45, max_det=1000, name='widerface_yolov6l', not_save_img=True, project='runs/inference', save_dir=None, save_txt=False, save_txt_widerface=True, source='C:\Users\Lenovo\Desktop\widerface\images\valid', view_img=False, webcam=False, webcam_addr='0', weights='C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\yolov6l_face.pt', yaml='C:\Users\Lenovo\Desktop\widerface\data.yaml') Loading checkpoint from C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\yolov6l_face.pt

Fusing model... Switch model to deploy modality. 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 324/324 [13:53<00:00, 2.57s/it] PS C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6> cd widerface_evaluate cd : Cannot find path 'C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6\widerface_evaluate' because it does not exist. At line:1 char:1

PS C:\Users\Lenovo\PycharmProjects\yolo6\YOLOv6>

Chilicyy commented 1 year ago

Hi @oussaifi-majdi , we have updated pretrained weights matching for the latest code. Please git pull the latest code on main branch, and download pretrained weights from 4.0 release page.

oussaifi-majdi commented 1 year ago

I try to find a simple face detection code with yolo-face-lite but I can't find it so I do the steps from https://github.com/meituan/YOLOv6/blob/yolov6-face/README.md but still i have the same error

Chilicyy commented 1 year ago

Hi, we have updated pretrained weights matching for the latest code. Please git pull the latest code on main branch, and download pretrained weights from 4.0 release page.