开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 9989|回复: 4
收起左侧

[技术专题] 当前最快的实例分割模型:YOLACT 易语言调用

[复制链接]
结帖率:87% (79/91)
发表于 2022-8-8 15:09:27 | 显示全部楼层 |阅读模式   江苏省苏州市
本帖最后由 z13228604287 于 2022-8-8 15:18 编辑

QQ图片20220808151445.png
YOLACT:https://github.com/dbolya/yolact 1.png 3.png 2.png

  
窗口程序集名保 留  保 留备 注
程序集1   
子程序名返回值类型公开备 注
_启动子程序整数型 本子程序在程序启动后最先执行
变量名类 型静态数组备 注
分割YOLACT 
预测图多维矩阵类 
分割.初始化 (0.5, 0.5)
预测图 = 视觉_图像解码 ( #预测图, #读图_彩色 )
分割.检测 (预测图)
视觉_创建窗口 (“小白鼠”, #窗口_标准 )
视觉_显示图像 (“小白鼠”, 预测图)
视觉_等待按键 (0)
视觉_销毁所有窗口 ()
返回 (0)  ' 可以根据您的需要返回任意数值



i支持库列表   支持库注释   
OpenCV(未知支持库)
  
窗口程序集名保 留  保 留备 注
YOLACT, , 公开, You Only Look At CoefficienTs   
变量名类 型数组备 注
类_名文本型0 
BGR颜色数组字节型82,3 
目标_尺寸整数型  
MEANS小数型3 
STD小数型3 
置信_阈值小数型  
抑制_阈值小数型  
保存_顶边_k整数型  
转化率_ws整数型5 
转化率_hs整数型5 
纵横比小数型3 
scales小数型5 
var小数型4 
掩码_h整数型  
掩码_w整数型  
数_预测框整数型  
预测框小数型0 
DNN网络网络类  

子程序名返回值类型公开备 注
_初始化 当基于本类的对象被创建后,此方法会被自动调用
目标_尺寸 = 550
MEANS = { 123.68, 116.78, 103.94 }
STD = { 58.4, 57.12, 57.38 }
转化率_ws = { 69, 35, 18, 9, 5 }
转化率_hs = { 69, 35, 18, 9, 5 }
纵横比 = { 1, 0.5, 2 }
scales = { 24, 48, 96, 192, 384 }
var = { 0.1, 0.1, 0.2, 0.2 }
掩码_h = 138
掩码_w = 138
类_名 = { “background”, “person”, “bicycle”, “car”, “motorcycle”, “airplane”, “bus”, “train”, “truck”, “boat”, “traffic light”, “fire hydrant”, “stop sign”, “parking meter”, “bench”, “bird”, “cat”, “dog”, “horse”, “sheep”, “cow”, “elephant”, “bear”, “zebra”, “giraffe”, “backpack”, “umbrella”, “handbag”, “tie”, “suitcase”, “frisbee”, “skis”, “snowboard”, “sports ball”, “kite”, “baseball bat”, “baseball glove”, “skateboard”, “surfboard”, “tennis racket”, “bottle”, “wine glass”, “cup”, “fork”, “knife”, “spoon”, “bowl”, “banana”, “apple”, “sandwich”, “orange”, “broccoli”, “carrot”, “hot dog”, “pizza”, “donut”, “cake”, “chair”, “couch”, “potted plant”, “bed”, “dining table”, “toilet”, “tv”, “laptop”, “mouse”, “remote”, “keyboard”, “cell phone”, “microwave”, “oven”, “toaster”, “sink”, “refrigerator”, “book”, “clock”, “vase”, “scissors”, “teddy bear”, “hair drier”, “toothbrush” }
BGR颜色数组 [1] [1] = 56
BGR颜色数组 [1] [3] = 255
BGR颜色数组 [2] [1] = 226
BGR颜色数组 [2] [2] = 255
BGR颜色数组 [3] [2] = 94
BGR颜色数组 [3] [3] = 255
BGR颜色数组 [4] [2] = 37
BGR颜色数组 [4] [3] = 255
BGR颜色数组 [5] [2] = 255
BGR颜色数组 [5] [3] = 94
BGR颜色数组 [6] [1] = 255
BGR颜色数组 [6] [2] = 226
BGR颜色数组 [7] [2] = 18
BGR颜色数组 [7] [3] = 255
BGR颜色数组 [8] [1] = 255
BGR颜色数组 [8] [2] = 151
BGR颜色数组 [9] [1] = 170
BGR颜色数组 [9] [3] = 255
BGR颜色数组 [10] [2] = 255
BGR颜色数组 [10] [3] = 56
BGR颜色数组 [11] [1] = 255
BGR颜色数组 [11] [3] = 75
BGR颜色数组 [12] [2] = 75
BGR颜色数组 [12] [3] = 255
BGR颜色数组 [13] [2] = 255
BGR颜色数组 [13] [3] = 169
BGR颜色数组 [14] [1] = 255
BGR颜色数组 [14] [3] = 207
BGR颜色数组 [15] [1] = 75
BGR颜色数组 [15] [2] = 255
BGR颜色数组 [16] [1] = 207
BGR颜色数组 [17] [3] = 255
BGR颜色数组 [18] [1] = 37
BGR颜色数组 [18] [3] = 255
BGR颜色数组 [19] [2] = 207
BGR颜色数组 [19] [3] = 255
BGR颜色数组 [20] [1] = 94
BGR颜色数组 [20] [3] = 255
BGR颜色数组 [21] [2] = 255
BGR颜色数组 [21] [3] = 113
BGR颜色数组 [22] [1] = 255
BGR颜色数组 [22] [2] = 18
BGR颜色数组 [23] [1] = 255
BGR颜色数组 [23] [3] = 56
BGR颜色数组 [24] [1] = 18
BGR颜色数组 [24] [3] = 255
BGR颜色数组 [25] [2] = 255
BGR颜色数组 [25] [3] = 226
BGR颜色数组 [26] [1] = 170
BGR颜色数组 [26] [2] = 255
BGR颜色数组 [27] [1] = 255
BGR颜色数组 [27] [3] = 245
BGR颜色数组 [28] [1] = 151
BGR颜色数组 [28] [2] = 255
BGR颜色数组 [29] [1] = 132
BGR颜色数组 [29] [2] = 255
BGR颜色数组 [30] [1] = 75
BGR颜色数组 [30] [3] = 255
BGR颜色数组 [31] [1] = 151
BGR颜色数组 [31] [3] = 255
BGR颜色数组 [32] [2] = 151
BGR颜色数组 [32] [3] = 255
BGR颜色数组 [33] [1] = 132
BGR颜色数组 [33] [3] = 255
BGR颜色数组 [34] [2] = 255
BGR颜色数组 [34] [2] = 245
BGR颜色数组 [35] [1] = 255
BGR颜色数组 [35] [2] = 132
BGR颜色数组 [36] [1] = 226
BGR颜色数组 [36] [3] = 255
BGR颜色数组 [37] [1] = 255
BGR颜色数组 [37] [2] = 37
BGR颜色数组 [38] [1] = 207
BGR颜色数组 [38] [2] = 255
BGR颜色数组 [39] [2] = 255
BGR颜色数组 [39] [3] = 207
BGR颜色数组 [40] [1] = 94
BGR颜色数组 [40] [2] = 255
BGR颜色数组 [41] [2] = 226
BGR颜色数组 [41] [3] = 255
BGR颜色数组 [42] [1] = 56
BGR颜色数组 [42] [2] = 255
BGR颜色数组 [43] [1] = 255
BGR颜色数组 [43] [2] = 94
BGR颜色数组 [44] [1] = 255
BGR颜色数组 [44] [2] = 113
BGR颜色数组 [45] [2] = 132
BGR颜色数组 [45] [3] = 255
BGR颜色数组 [46] [1] = 255
BGR颜色数组 [46] [3] = 132
BGR颜色数组 [47] [1] = 255
BGR颜色数组 [47] [2] = 170
BGR颜色数组 [48] [1] = 255
BGR颜色数组 [48] [3] = 188
BGR颜色数组 [49] [1] = 113
BGR颜色数组 [49] [2] = 255
BGR颜色数组 [50] [1] = 245
BGR颜色数组 [50] [3] = 255
BGR颜色数组 [51] [1] = 113
BGR颜色数组 [51] [3] = 255
BGR颜色数组 [52] [1] = 255
BGR颜色数组 [52] [2] = 188
BGR颜色数组 [53] [2] = 113
BGR颜色数组 [53] [3] = 255
BGR颜色数组 [54] [1] = 255
BGR颜色数组 [55] [2] = 56
BGR颜色数组 [55] [3] = 255
BGR颜色数组 [56] [1] = 255
BGR颜色数组 [56] [3] = 113
BGR颜色数组 [57] [2] = 255
BGR颜色数组 [57] [3] = 188
BGR颜色数组 [58] [1] = 255
BGR颜色数组 [58] [3] = 94
BGR颜色数组 [59] [1] = 255
BGR颜色数组 [59] [3] = 18
BGR颜色数组 [60] [1] = 18
BGR颜色数组 [60] [2] = 255
BGR颜色数组 [61] [2] = 255
BGR颜色数组 [61] [3] = 132
BGR颜色数组 [62] [2] = 188
BGR颜色数组 [62] [3] = 255
BGR颜色数组 [63] [2] = 245
BGR颜色数组 [63] [3] = 255
BGR颜色数组 [64] [2] = 169
BGR颜色数组 [64] [3] = 255
BGR颜色数组 [65] [1] = 37
BGR颜色数组 [65] [2] = 255
BGR颜色数组 [66] [1] = 255
BGR颜色数组 [66] [3] = 151
BGR颜色数组 [67] [1] = 188
BGR颜色数组 [67] [3] = 255
BGR颜色数组 [68] [2] = 255
BGR颜色数组 [68] [3] = 37
BGR颜色数组 [69] [2] = 255
BGR颜色数组 [70] [1] = 255
BGR颜色数组 [70] [3] = 170
BGR颜色数组 [71] [1] = 255
BGR颜色数组 [71] [3] = 37
BGR颜色数组 [72] [1] = 255
BGR颜色数组 [72] [2] = 75
BGR颜色数组 [73] [3] = 255
BGR颜色数组 [74] [1] = 255
BGR颜色数组 [74] [2] = 207
BGR颜色数组 [75] [1] = 255
BGR颜色数组 [75] [3] = 226
BGR颜色数组 [76] [1] = 255
BGR颜色数组 [76] [1] = 245
BGR颜色数组 [77] [1] = 188
BGR颜色数组 [77] [2] = 255
BGR颜色数组 [78] [2] = 255
BGR颜色数组 [78] [3] = 18
BGR颜色数组 [79] [2] = 255
BGR颜色数组 [79] [3] = 75
BGR颜色数组 [80] [2] = 255
BGR颜色数组 [80] [3] = 151
BGR颜色数组 [81] [1] = 255
BGR颜色数组 [81] [2] = 56
BGR颜色数组 [82] [1] = 245
BGR颜色数组 [82] [2] = 255
子程序名返回值类型公开备 注
_销毁 当基于本类的对象被销毁前,此方法会被自动调用

子程序名返回值类型公开备 注
初始化 
参数名类 型参考可空数组备 注
confThreshold小数型
nmsThreshold小数型
keep_top_ks整数型
变量名类 型静态数组备 注
p整数型 
conv_w整数型 
conv_h整数型 
scale小数型 
i整数型 
j整数型 
cx小数型 
cy小数型 
k整数型 
ar小数型 
w小数型 
h小数型 
arget_size小数型 
pb小数型指针类 
如果真 (是否为空 (keep_top_ks))
keep_top_ks = 200
置信_阈值 = confThreshold
抑制_阈值 = nmsThreshold
保存_顶边_k = keep_top_ks
DNN网络 = 视觉_读取网络 (“C:\Users\hanyo\Desktop\yolact_base_54_800000.onnx”, , “”)
计次循环首 (5, p)
数_预测框 = 转化率_ws [p] × 转化率_hs [p] × 3 + 数_预测框
计次循环尾 ()
重定义数组 (预测框, 假, 4 × 数_预测框)
pb.指针 = 取变量数据地址 (预测框)
' 生成预测框
计次循环首 (5, p)
conv_w = 转化率_ws [p]
conv_h = 转化率_hs [p]
scale = scales [p]
变量循环首 (0, conv_h - 1, 1, i)
变量循环首 (0, conv_w - 1, 1, j)
cx (j + 0.5) ÷ conv_w
cy (i + 0.5) ÷ conv_h
计次循环首 (3, k)
ar = 纵横比 [k]
ar = 求平方根 (ar)
w = scale × ar ÷ 目标_尺寸
h = scale ÷ ar ÷ 目标_尺寸
' // 这是为了向后兼容一个错误,我不小心把所有东西都弄成方形
' // cfg.backbone.use_square_anchors:
h = w
pb. (0, cx)
pb. (1, cy)
pb. (2, w)
pb. (3, h)
pb.偏移 (4)
计次循环尾 ()
变量循环尾 ()
变量循环尾 ()
计次循环尾 ()
子程序名返回值类型公开备 注
检测 
参数名类 型参考可空数组备 注
输入图片多维矩阵类
变量名类 型静态数组备 注
图片_w整数型 
图片_h整数型 
图片多维矩阵类 
斑点多维矩阵类 
输出s多维矩阵类0
类Ids整数型0
置信度s小数型0
预测框s矩形2i类0
掩码Ids整数型0
数_类整数型 
分数多维矩阵类 
类Id坐标点2i类 
得分双精度小数型 
i整数型 
loc小数型指针类 
pb小数型指针类 
pb_cx小数型 
pb_cy小数型 
pb_w小数型 
pb_h小数型 
预测框_cx小数型 
预测框_cy小数型 
预测框_w小数型 
预测框x_h小数型 
对象_x1小数型 
对象_y1小数型 
对象_x2小数型 
对象_y2小数型 
指数整数型0
idx整数型 
box矩形2i类 
xmax整数型 
ymax整数型 
标题文本型 
标签尺寸尺寸2i类 
ymin整数型 
蒙版多维矩阵类 
蒙版2多维矩阵类 
通道l整数型 
面积整数型 
系数指针小数型指针类 
pm小数型指针类 
掩码图指针小数型指针类 
j整数型 
p整数型 
y整数型 
蒙版指针小数型指针类 
蒙版数据指针字节型指针类 
x整数型 
图片_w = 输入图片.列数 ()
图片_h = 输入图片.行数 ()
视觉_调整尺寸 (输入图片, 图片, 尺寸2i (目标_尺寸, 目标_尺寸), #插值_双线性二次, 0, 1)
视觉_颜色空间转换 (图片, 图片, #颜色_BGR转RGB, 0)
归一化 (图片)
斑点 = 视觉_图像前景目标 (图片, 1, , , 假, 假, 5)
DNN网络.设置输入 (斑点, “”, 1, )
DNN网


i支持库列表   支持库注释   
OpenCV(未知支持库)
spec特殊功能支持库





4.png



点评

识别效果:西瓜 → basketball   新疆维吾尔自治区乌鲁木齐市  发表于 2022-8-8 16:52

评分

参与人数 1好评 +1 精币 +2 收起 理由
Xiaochuzhang + 1 + 2 支持开源~!感谢分享

查看全部评分


本帖被以下淘专辑推荐:

签到天数: 8 天

发表于 2023-1-10 14:51:55 | 显示全部楼层   河南省鹤壁市
666
回复 支持 反对

使用道具 举报

发表于 2022-9-16 23:56:36 | 显示全部楼层   河北省保定市
666666666666666666666
回复 支持 反对

使用道具 举报

签到天数: 10 天

发表于 2022-8-10 11:10:32 | 显示全部楼层   广东省汕头市
支持开源~!感谢分享
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表