Giter VIP home page Giter VIP logo

promptnucseg's People

Contributors

windygoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

promptnucseg's Issues

图片大小的问题

作者您好,我在训练prompter的时候遇到这个问题

    return torch.stack(images), torch.stack(masks), points, labels
RuntimeError: stack expects each tensor to be equal size, but got [3, 512, 512] at entry 0 and [3, 608, 608] at entry 1

是两张图片的大小不一样导致的
我使用的是cpm17数据集,配置文件是prompter/config/cpm17.py。
cpm17的图片大小不一致,数据增强部分有pad,但是并没有pad到同一大小

train=dict(
        transform=[
            dict(type="RandomGridShuffle", grid=(4, 4), p=0.5),
            dict(
                type="ColorJitter",
                brightness=0.25,
                contrast=0.25,
                saturation=0.1,
                hue=0.05,
                p=0.2,
            ),
            dict(type="RandomRotate90", p=0.5),
            dict(type="Downscale", scale_max=0.5, scale_min=0.5, p=0.15),
            dict(type="Blur", blur_limit=10, p=0.2),
            dict(type="GaussNoise", var_limit=50, p=0.25),
            dict(type="ZoomBlur", p=0.1, max_factor=1.05),
            dict(type="HorizontalFlip", p=0.5),
            dict(type="VerticalFlip", p=0.5),
            dict(
                type="ShiftScaleRotate",
                shift_limit=0.3,
                scale_limit=0.1,
                rotate_limit=0,
                border_mode=0,
                value=0,
                p=0.5,
            ),
            dict(
                type="PadIfNeeded",
                min_height=None,
                min_width=None,
                pad_height_divisor=prompter["space"],
                pad_width_divisor=prompter["space"],
                position="top_left",
                p=1,
            ),
            dict(type="Normalize"),
        ]
    ),

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.