Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,839 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YOLO-ELLIPSE

此项目拷了yolov5,在它的基础上修改

重要代码

code desciption
detect.py 原版推理代码
realsense detect.py 原版 + 自注释
realsense ellipse.py YOLO + ellipse Pose Estimation
realsense geometry.py 给ellipse服务的几何计算模块
./utils/dataloader.py source 参数为666时使用realsense
  • realsense_ellipse_debug.py及其对应的geometry模块应该功能比较完整(这里的或者xmate control里面实现的是最终版本)
  • 其它realsense_ellipse_*是一些辅助脚本

代码分析

运行方法

realsense

准备: 先接上一个realsense;切换到当前目录;conda环境为yolov5
exp6最新,效果较好

$ python realsense_detect.py --source 666 --weight runs/train/exp3/weights/best.pt --conf 0.7

视频例子

$ python3 realsense_ellipse.py --source /home/robot/developEye/test_video/0825_2.avi --weight runs/train/exp5/weights/best.pt --conf 0.7  

目前调整分辨率须修改dataloader,同时要改geometry来换内参

内窥镜

准备: 先接上一个摄像头,不能是realsense;切换到当前目录;conda环境为yolov5

$ python detect.py --source 0 --weight runs/train/exp3/weights/best.pt --conf 0.7

**参数:**source指定摄像头,weight是模型参数,conf是置信度阈值

训练集问题

  • 格式 举例来说,要用real_eye训练集训练,以此为根目录,../datasets中放置名为real_eye的文件夹,其中包括训练、验证、测试; 还需要在./data中写一份.yaml文件,可以参照real_eye.yaml; 上述说得简略,详情见此处Option2; 训练运行指令为
$ python train.py --img 640 --epochs 100 --data real_eye.yaml --weights yolov5s.pt

结果在./runs中,运行参照运行方法部分
更多详情参照yolov5官方文档

About

rough detection module for eye tracker

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages