博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
O(1)纬度减少循环次数
阅读量:4613 次
发布时间:2019-06-09

本文共 4529 字,大约阅读时间需要 15 分钟。

图像分割(image segmentation)是计算机视觉中非常重要的研究和应用方向,是根据某些规则将图片中的像素分成不同的部分、打上不同标签。图解如下:

 

1、图像分类(image classification)

识别图像中存在的内容,如下图,有人(person)、树(tree)、草地(grass)、天空(sky)

 

2、目标检测(object detection)

识别图像中存在的内容和检测其位置,如下图,以识别和检测人(person)为例

 

3、语义分割(semantic segmentation)

对图像中的每个像素打上类别标签,如下图,把图像分为人(红色)、树木(深绿)、草地(浅绿)、天空(蓝色)标签

 

4、实例分割(instance segmentation)

目标检测和语义分割的结合,在图像中将目标检测出来(目标检测),然后对每个像素打上标签(语义分割)。对比上图、下图,如以人(person)为目标,语义分割不区分属于相同类别的不同实例(所有人都标为红色),实例分割区分同类的不同实例(使用不同颜色区分不同的人)

 

5、全景分割(panoptic segmentation)

语义分割和实例分割的结合,即要对所有目标都检测出来,又要区分出同个类别中的不同实例。对比上图、下图,实例分割只对图像中的目标(如上图中的人)进行检测和按像素分割,区分不同实例(使用不同颜色),而全景分割是对图中的所有物体包括背景都要进行检测和分割,区分不同实例(使用不同颜色)

 

推荐相关阅读

1、AI 实战系列

  • 【AI实战】手把手教你文字识别(文字检测篇:MSER、CTPN、SegLink、EAST 等)
  • 【AI实战】手把手教你文字识别(入门篇:验证码识别)
  • 【AI实战】快速掌握TensorFlow(一):基本操作
  • 【AI实战】快速掌握TensorFlow(二):计算图、会话
  • 【AI实战】快速掌握TensorFlow(三):激励函数
  • 【AI实战】快速掌握TensorFlow(四):损失函数
  • 【AI实战】搭建基础环境
  • 【AI实战】训练第一个模型
  • 【AI实战】编写人脸识别程序
  • 【AI实战】动手训练目标检测模型(SSD篇)
  • 【AI实战】动手训练目标检测模型(YOLO篇)

2、大话深度学习系列

  • 【精华整理】CNN进化史
  • 大话文本识别经典模型(CRNN)
  • 大话文本检测经典模型(CTPN)
  • 大话文本检测经典模型(SegLink)
  • 大话文本检测经典模型(EAST)
  • 大话卷积神经网络(CNN)
  • 大话循环神经网络(RNN)
  • 大话深度残差网络(DRN)
  • 大话深度信念网络(DBN)
  • 大话CNN经典模型:LeNet
  • 大话CNN经典模型:AlexNet
  • 大话CNN经典模型:VGGNet
  • 大话CNN经典模型:GoogLeNet
  • 大话目标检测经典模型:RCNN、Fast RCNN、Faster RCNN
  • 大话目标检测经典模型:Mask R-CNN

3、图解 AI 系列

  • 什么是语义分割、实例分割、全景分割

4、AI 杂谈

1 package com.xinyan.springcloud.tjt;

2
3 import java.util.ArrayList;
4 import java.util.HashMap;
5 import java.util.List;
6 import java.util.Map;
7
8 import org.apache.commons.lang.StringUtils;
9
10 import lombok.Data;
11
12 public class CompareOne {
13 private static List<KeyInfo> list1 = new ArrayList<>();
14 private static List<CipherPathInfo> list2 = new ArrayList<>();
15
16 /**
17 * 比较low的methodOne设计
18 */
19 public void methodOne() {
20 // 匹配list1 和 list2 中keyName相等的cipher,并把list1中的cipher写入list2:
21 // 设计方案1:
22 for (int i = 0; i < list1.size(); i++) {
23 KeyInfo keyInfo = list1.get(i);
24 String keyName = keyInfo.getKeyName();
25 String cipher = keyInfo.getCipher();
26 for (int j = 0; j < list2.size(); j++) {
27 CipherPathInfo cipherPathInfo = list2.get(j);
28 String keyName2 = cipherPathInfo.getKeyName();
29 if (StringUtils.equals(keyName, keyName2)) {
30 cipherPathInfo.setCipher(cipher);
31 }
32 }
33 }
34 }
35
36 /**
37 * 较好的methodTwo设计
38 */
39 public void methodTwo() {
40 // 匹配list1 和 list2 中keyName相等的cipher,并把list1中的cipher写入list2:
41 // 设计方案2:
42 Map<String, String> keyNameMap = new HashMap<>();
43 // 使用keyNameMap缓存keyName的cipher
44 for (int i = 0; i < list1.size(); i++) {
45 KeyInfo keyInfo = list1.get(i);
46 String keyName = keyInfo.getKeyName();
47 String cipher = keyInfo.getCipher(www.huishenggw.cn);
48 keyNameMap.put(keyName, cipher);
49 }
50 // 根据keyName的名称查keyNameMap取出cipher
51 for (int j = 0; j < list2.size(www.yuntianyuL.cn); j++) {
52 CipherPathInfo cipherPathInfo = list2.get(www.shengryll.com);
53 String keyName = cipherPathInfo.getKeyName();
54 String cipher = keyNameMap.get(keyName);
55 if (StringUtils.isNotEmpty(cipher)) {
56 cipherPathInfo.setCipher(cipher);
57 }
58 }
59 }
60
61 /**
62 * 实体KeyInfo
63 *
64 * @author apple
65 */
66 @Data
67 class KeyInfo {
68 private String keyName;
69 private String cipher;
70 }
71
72 /**
73 * 实体CipherPathInfo
74 *
75 * @author apple
76 */
77 @Data
78 class CipherPathInfo {
79 private String keyName;
80 private String cipher;
81 private String path;
82 }
83
84 /**
85 * 构造KeyInfo、CipherPathInfo实体信息
86 */
87 public void makeEntityInfo(www.yongshi123.cn) {
88 KeyInfo keyInfo = new KeyInfo();
89 // 构造30个keyInfo实体
90 for (int i = 0; i < 30; i++) {
91 keyInfo.setKeyName("name_" + i);
92 keyInfo.setCipher("cipher_" www.guochengzy.com+ i);
93 list1.add(keyInfo);
94 }
95 CipherPathInfo cipherPathInfo =www.chengmingdL.com new CipherPathInfo();
96 // 构造100个ciperhPathInfo实体,其中cipher为null
97 for (int j = 0; j < 100; j++) {
98 cipherPathInfo.setKeyName("name_" + j);
99 cipherPathInfo.setPath("path_" + j);
100 list2.add(cipherPathInfo);
101 }
102 }
103
104 public static void main(String[www.meiwanyule.cn] args) {
105 CompareOne c = new CompareOne();
106 c.makeEntityInfo();
107 // 匹配list1 和 list2 中keyName相等的cipher,并把list1中的cipher写入list2:
108 // 设计方案1:
109 c.methodOne();
110 // 方案1设计明显不合理,很low;其中list1有30个元素,而list2有100个
111 // 这样就会累计循环30*100次
112 // 可以将讲list1中获取到的keyName插入哈希中,只需要O(1)的纬度
113 // 方案设计2:
114 c.methodTwo();

  • 27种深度学习经典模型
  • 浅说“迁移学习”
  • 什么是“强化学习”
  • AlphaGo算法原理浅析
  • 大数据究竟有多少个V

5、大数据超详细系列

  • Apache Hadoop 2.8 完全分布式集群搭建超详细教程
  • Apache Hive 2.1.1 安装配置超详细教程
  • Apache HBase 1.2.6 完全分布式集群搭建超详细教程
  • 离线安装Cloudera Manager 5和CDH5(最新版5.13.0)超详细教程

转载于:https://www.cnblogs.com/qwangxiao/p/10947451.html

你可能感兴趣的文章
各浏览器对 onbeforeunload 事件的支持与触发条件实现有差异
查看>>
PHP中获取当前页面的完整URL
查看>>
所谓输入掩码技术,即只有数字键起作用
查看>>
Display对象,Displayable对象
查看>>
安装oracle11G,10G时都会出现:注册ocx时出现OLE初始化错误或ocx装载错误对话框
查看>>
数据结构(并查集):COGS 260. [NOI2002] 银河英雄传说
查看>>
生产环境下正则的应用实例(一)
查看>>
在CentOS7命令行模式下安装虚拟机
查看>>
【Hadoop】三句话告诉你 mapreduce 中MAP进程的数量怎么控制?
查看>>
【微信小程序】 引用公共js里的方法
查看>>
统计学的统一(2)
查看>>
AE程序中变量的类型
查看>>
python3多线程爬虫(第一卷)
查看>>
列表元祖的一些方法
查看>>
[操作系统实验lab3]实验报告
查看>>
Android倒计时简单实现
查看>>
js数组
查看>>
开学第一周
查看>>
shell 的变量
查看>>
11.16-11.22学习笔记
查看>>