Giter Site home page Giter Site logo

Comments (8)

novioleo avatar novioleo commented on April 19, 2024

@cendelian 抱歉看到晚了。能麻烦print一下错误的时候distance的值么

from pytorchocr.

dengfenglai321 avatar dengfenglai321 commented on April 19, 2024

@cendelian 抱歉看到晚了。能麻烦print一下错误的时候distance的值么
image

对应的代码如下:

    # if padding.Execute(distance) is None:
        #     print('None')
        print('distance : ',distance)
        print('----------------------------')
        padded_polygon = np.array(padding.Execute(distance)[0])
        print('padded_polygon: ',padded_polygon)
        cv2.fillPoly(mask, [padded_polygon.astype(np.int32)], 1.0)

请问该怎么解决?
运行时batch :1, numworker:1

from pytorchocr.

novioleo avatar novioleo commented on April 19, 2024

这个是你这个标注数据区域shrink的话太小,小于0了。你可以调整shrink比例,也可以check一下你的这个case的标注情况。

from pytorchocr.

dengfenglai321 avatar dengfenglai321 commented on April 19, 2024

这个是你这个标注数据区域shrink的话太小,小于0了。你可以调整shrink比例,也可以check一下你的这个case的标注情况。

shrink比例在哪里调?调小还是调大?
还有一样的数据集,我在大佬WenmuZhou / DBNet.pytorch这个项目里就能跑通没有任何错误。

我感觉WenmuZhou / DBNet.pytorch 和WenmuZhou / PytorchOCR这两个项目的文本检测部分都差不多吧

from pytorchocr.

dengfenglai321 avatar dengfenglai321 commented on April 19, 2024

这个是你这个标注数据区域shrink的话太小,小于0了。你可以调整shrink比例,也可以check一下你的这个case的标注情况。

我使用WenmuZhou / DBNet.pytorch跑一样的数据集,推理发现结果的标注的确比正常文本框要小。。。比如下图:
image

大佬该怎么调shrink呢?
实在config下调那个shrink_ratio吗?调大?
# db 预处理,不需要修改

            'pre_processes': [{'type': 'IaaAugment', 'args': [{'type': 'Fliplr', 'args': {'p': 0.5}},
                                                              {'type': 'Affine', 'args': {'rotate': [-10, 10]}},
                                                              {'type': 'Resize', 'args': {'size': [0.5, 3]}}]},
                              {'type': 'EastRandomCropData', 'args': {'size': [640, 640], 'max_tries': 50, 'keep_ratio': True}},
                              {'type': 'MakeBorderMap', 'args': {'shrink_ratio': 0.4, 'thresh_min': 0.3, 'thresh_max': 0.7}},
                              {'type': 'MakeShrinkMap', 'args': {'shrink_ratio': 0.4, 'min_text_size': 8}}],

from pytorchocr.

WenmuZhou avatar WenmuZhou commented on April 19, 2024

框小了,需要unclip_ratio调大

from pytorchocr.

dengfenglai321 avatar dengfenglai321 commented on April 19, 2024

框小了,需要unclip_ratio调大

大佬你好,我将unclip_ration调到2.0了 还是报一样的错误

from pytorchocr.

novioleo avatar novioleo commented on April 19, 2024

我觉得是标注的数据有点问题

from pytorchocr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.