精华内容
下载资源
问答
  • 文章目录What If We Only Use Real Datasets for Scene Text Recognition?Toward Scene Text Recognition With Fewer Labels1.知识点介绍2.实验 What If We Only Use Real Datasets for Scene Text Recognition?...

    What If We Only Use Real Datasets for Scene Text Recognition?Toward Scene Text Recognition With Fewer Labels

    2014年之后出现大量合成的数据,真实标签(比较少,影响模型精度)的识别较少

    标签较少的STR被认为是困难的,因为只有成千上万的真实数据,导致准确性低。

    我们证明只有使用真实标签才能令人满意地训练STR模型

    • 贡献
      • 1)仅使用真实标签就显示出足够的性能,简单的数据扩充可以充分利用真实数据
        • 真实数据(276K)的精度接近于合成数据(16M)
      • 2)在标签较少的字符串中引入半监督和自监督方法,进一步提高了性能.

    1.知识点介绍

    • 合成数据

      • 在一张图片中的某些区域添加文本,并加以不同的变化,比如字体的变化、颜色的变化、位置的变化
    • 用于半监督和自监督学习的数据集(合并了2个未标记的数据集,1个标记的数据集)

      • BOOK32:包含许多手写或弯曲的文本 (在其上使用PL(半监督的一种方法,Pseudo-Label (PL) )),未标记
      • TextVQA :为基于文本的可视化问题回答而创建的。来自“广告牌”和“交通标志”等类别的28K OpenImage V3 [23]图像组成。未标记
      • ST-VQA:场景文本,包含IC13、IC15和COCO
    • 11个真实的数据集

    数据集描述
    2011_SVT,2013 IIIT,2013_IC13大部分图像都是街上的横排文字
    2015 _IC15透视文本、模糊或低分辨率图像
    2017_COCO遮挡或低分辨率的文本
    2017_RCTW为《在野外阅读中文》比赛而创作的,许多是中文文本
    2017_Uber从必应地图街边收集的。很多是门牌号,有的是招牌上的文字。
    2019_ArT为识别任意形状的文本而创建的。许多是透视或弯曲的文本.它还包括Totaltext [8]和CTW1500 [33],其中包含许多旋转或弯曲的文本
    2019_LSVT一个大规模的街景文本数据集,收集自中国的街道,许多是中文文本
    2019_MLT19为识别多语言文本而创建的。由七种语言组成:阿拉伯语、拉丁语、汉语、日语、韩语、孟加拉语和印地语
    2019_ReCTS包含许多以各种布局排列或用独特字体书写的不规则文本
    • 真实数据的预处理

      • 仅收集英文单词,关心横向文本,排除了垂直文本,排除超过25个字符的文本,划分训练集与验证集(63k)
    • STR Model Framework

    • image-20210320162013531

      • Transformation (Trans.):将透视文本或弯曲文本规范化为水平文本。(STN)
        • 关于Spatial Transformer Network (STN)https://blog.csdn.net/qq_39422642/article/details/78870629
        • STN:缩放,旋转,平移等(其实就是矫正)
        • 带来的问题,矫正后图像会不会失真,STN之后加一个模块类似于可以使得图像变真的东西
      • Feature extraction (Feat.):特征提取,VGG,ResNet
      • Sequence modeling (Seq.):将视觉特征转换为捕捉字符序列中上下文的上下文特征。BiLSTM,GRU
      • Prediction (Pred.):根据上下文特征预测字符序列。CTC,attention
    • 半监督学习

    • image-20210320161145792

      • Pseudo-Label (PL) 伪标签
        • 使用未标记数据的简单方法,
        • 1)在标记的数据上训练模型。
        • 2)使用训练好的模型,对未标记的数据进行预测,并将其用作伪标记。
        • 3)合并标记和伪标记的数据,作为训练的数据集,重新训练模型。
        • 容易出现的问题:是当label数据很少的时候,模型很容易过拟合,
      • Mean Teacher (MT)
        • https://zhuanlan.zhihu.com/p/99513085?from_voters_page=true
        • 原版的MThttps://blog.csdn.net/ld326/article/details/114107687
        • 1)准备模型(学生模型)和模型的副本(老师模型)。
        • 2)在同一小批量上应用两个随机增量η(输入学生模型)和η0(输入教师模型)。
        • 3)计算两个模型输出的均方误差损失(MSE)。
        • 4)将梯度回传给学生模型,对prediction s中的label数据计算Cross-entropy loss,更新学生模型。
        • 5)用学生模型的指数移动平均线(EMA)更新教师模型。
    • 自监督学习

      • 步骤:

        • 1)surrogate (pretext) task1)用代理(借口)任务预训练模型。
          • 实际上就是在无标签的数据集上训练得到伪标签(学习到提取特征的能力)
          • 常用的pretext task几伪标签的产生方式:Rotation(图片旋转),Colorization(图片上色),Inpainting(图片补全),Jigsaw Puzzle/Context Prediction(关系预测/上下文预测)
          • https://www.zhihu.com/question/358468168
          1. 使用预训练的权重进行初始化,为主要任务训练模型
      • RotNet

        • 预测图像的旋转作为代理任务。将输入图像旋转0度、90度、180度和270度,模型识别应用于图像的旋转
      • Momentum Contrast (MoCo) 动量对比 --何凯明

        • pretext task:instance discrimination task 实例识别
          • 1)准备模型(作为查询编码器)和模型的副本(作为动量编码器)。

          • 2)在同一小批量上应用两个随机增量η(输入到查询编码器,以生成编码查询q)和η0(输入到动量编码器中,以生成编码密钥k)

          • 3)计算查询q和密钥k的对比损失(看是不是同一个图像),称为InfoNCE [45]。一对q和k,如果它们来自同一图像,则分配一个正标签,否则分配一个负标签。

          • 4)更新查询编码器。

          • 5)用查询编码器的移动平均值更新动量编码器。

            • image-20210321095646853
            • image-20210321100011228

    2.实验

    • 在真实的数据集上做的实验

      • Accuracy depending on dataset increment
        • image-20210320171613829
        • 随着真实数据的增加,使用真实数据获得的精度接近使用合成数据获得的精度,在基于vgg的CRNN,基于ResNet的TRBA ,真实数据(276K)的精度接近于合成数据(16M)
        • 根据[1] (论文),训练集的多样性可能比训练集的数量更重要,我们使用11个数据集,这意味着高度的多样性,总共大小为276k做实验
        • 相同大小的合成数据和真实数据做对比,CRNN,TRBA模型,真实数据比合成数据的准确性高十个百分点
      • Improvement by simple data augmentations 数据增广
        • image-20210320172226857
    • Semi- and Self-Supervised Learning

      • image-20210320172534656

    pSlCOnm2-1619266423172)]

    • Semi- and Self-Supervised Learning
      • [外链图片转存中…(img-iKBPG0Pp-1619266423175)]
    展开全文
  • I'm trying to select different prices of a product based on the quantity that user chooses.This is the query I'm working on (it has a syntax error):select id,(SELECTIF(qty_1<='23',price,1)ELSEIF(('...

    I'm trying to select different prices of a product based on the quantity that user chooses.

    This is the query I'm working on (it has a syntax error):

    select id,

    (SELECT

    IF(qty_1<='23',price,1)

    ELSEIF(('23'>qty_1 && qty_2<='23'),price_2,1)

    ELSEIF(('23'>qty_2 && qty_3<='23'),price_3,1)

    ELSEIF('23'>qty_3,price_4,1)

    END IF) as total

    from product;

    解决方案

    You have what you have used in stored procedures like this for reference, but they are not intended to be used as you have now. You can use IF as shown by duskwuff. But a Case statement is better for eyes. Like this:

    select id,

    (

    CASE

    WHEN qty_1 <= '23' THEN price

    WHEN '23' > qty_1 && qty_2 <= '23' THEN price_2

    WHEN '23' > qty_2 && qty_3 <= '23' THEN price_3

    WHEN '23' > qty_3 THEN price_4

    ELSE 1

    END) AS total

    from product;

    This looks cleaner. I suppose you do not require the inner SELECT anyway..

    展开全文
  • try to polish your skills as much as possible by yourself then learn from the master students in this domain then make corresponding iterations consequently
    • try to polish your skills as much as possible by yourself
    • then learn from the master students in this domain
    • then make corresponding iterations consequently
    展开全文
  • Is Parallel Programming Hard, And, If So, What Can You Do About It?

    Is Parallel Programming Hard, And, If So, What
    Can You Do About It?

    展开全文
  • Python if else退出

    2020-12-23 09:49:33
    这是一个聊天回复程序,我目前面临的问题是,如果输入的答案与我的一个答案不匹配,我会尝试让它退出,但由于这三个问题的所有答案都是作为响应放在一起的...谢谢您的帮助1import randomx=input("What is your name?...
  • Python两个if语句

    2021-07-16 15:40:27
    True >>> is_valid_angle("1.5R") True """ if s[-1]=='r''R': if s (pi/2): if s > 0: return true else: if s[-1]=='d''D': if s < 90: if s > 0: return true I dont understand whats wrong What I have tried: ...
  • MYSQL INSERT或UPDATE IF

    2021-07-16 19:10:44
    Been looking around the web for a while now and don't seem to be able to come across anything similar to what I want. I know it's something to do with the way I'm writing my query but any help would b...
  • 错误:'else'没有'if'

    千次阅读 2021-02-27 21:46:35
    错误:'else'没有'if'没有if语句获取else:importjava.util.Scanner;publicclassLazyDaysCamp{publicstaticvoidmain(String[]args){inttemp;Scannerscan=newScanner(System.in);System.out.println("What'sthecu...
  • use video call instead even if it is with your parents unless it is not available now
  • Java一行if语句

    2021-07-16 23:50:47
    I am using if condition without braces in java something likeif(somecondition)//Only one line Business logicbut some told use braces always even one line statement something like thisif(somecondition)...
  • Java If语句的简写形式

    2021-07-16 20:17:46
    I know there is a way for writing java if statement in short formif (city.getName() != null) {name = city.getName();} else {name="N/A";}does anyone know how to write short form for above 5 lines into ...
  • 我是Java编码的初学者,因此我会定期浏览以我... 这是代码的一部分,因为我不需要显示整个代码:System.out.println("Hello, what's our name? My name is" + answer4);String a = scanner1.nextLine();System.out....
  • 结果是if在不匹配的时候并没有完全运行,这是因为_s3_bucket.list(prefix=basename)=[]。我恢复了对Python的信仰。:)谢谢大家!在为什么这段代码从来没有打印“不匹配”?当regex匹配时,它成功地打印“matches”,...
  • Anyone knows if it''s possible to do an update if, and only if mycondition is TRUE.Example:In MYTABLE I have three columns, like this:ID(INT), PUBLISH(ENUM(Y,N)), PASSWORD(VARCHAR(10))This is what ...
  • I have a function named checker(nums) that has an argument that will later receive a ... What i want to do with that list is to check if each other element is greater or equal to the previous one.Ex...
  • I understand you can't return from a ifPresent() so this example does not work:public boolean checkSomethingIfPresent() {mightReturnAString().ifPresent((item) -> {if (item.equals("something")) {// ...
  • 复制代码 代码如下:if list thendo something hereelif list thendo another thing hereelsedo something else herefiEX1:复制代码 代码如下:#!/bin/shSYSTEM=`uname -s` #获取操作系统类型,我本地是linu...
  • I apologize in advance, I'm sure the answer to this question is quite trivial, unfortunately I am just not sure what is going on.I am trying to run the following codea(1) = -2;b(1) = 2;c(1) = 0;for i ...
  • python中IF-ELSE块的缩进

    2021-07-16 13:24:51
    Hi I am python newbie and I am working on NLP using python. I am having a error in writing if-else block in ... When I am writing only if block at that time it is working fine:if xyzzy.endswith('l...
  • 成功解决We recommend that if you want Anaconda registered as your system Python, you unregister this Pyt 目录 解决问题 解决思路 解决方法 解决问题 A version of Python 3.8 ...
  • What I want to do is shown below in 2 stream calls. I want to split a collection into 2 new collections based on some condition. Ideally I want to do it in 1. I've seen conditions used for the .map fu...
  • 1) I'm not quite sure what you mean by "set one of the if statement conditions". But if you mean that the b-related test evaluates to true while the others still relate to false, then the behaviour i....
  • I have a list of list of float lists and I want to test if a value pair (e.g. [2.0, 1.1]) is already in this list. Therefor I wrote a simple code to check this. As far as I understand my code it shoul...
  • 因为写代码时候,发现这两个语句可以相互混着使用。然后搜了一下,这个blog总结的很好http://www.cnblogs.com/pangchunlei/p/5420491.html1 switch和if...=)的判断用if语句,而等于(=)的判断用switch语句。● swi...
  • Consider the following unformatted nested if-else Java codeif (condition 1)if (condition 2)action 1;...My question is: according to the Java language specifications, to what if does the else...
  • I have a small and simple MySQL code. But whenever I run it, I get error #1064. Can you tell me what is my mistake ...IF ((SELECT COUNT(id) FROM tbl_states) > 0) THENBEGINSELECT * FROM tbl_citie...
  • if-else语句在R中,if-else语句的语法是:if(condition){ Expr1 }else{ Expr2 } 210516_1例如,想检查变量qu...
  • HTML/PHP if-else Statement

    2021-06-12 12:39:28
    I am creating a website with Bootstrap and I would like to enter an if-else statement but I do not know how to do that. Let me explain:Here is an image of my current HTML snippet:Now what I want is, t...
  • Assigning a Django Model's field to a value if it matches a condition.g = Car.objects.get(pk=1234)g.data_version = my_dict['dataVersion'] if my_dict else expression_false # Do nothing??How do I do not...
  • 获取没有if语句的else:import java.util.Scanner;public class LazyDaysCamp{public static void main (String[] args){int temp;Scanner scan = new Scanner(System.in);System.out.println ("What's the current ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 637,292
精华内容 254,916
关键字:

if意思what