Skip to content

How to inference my data with a pix2pix model? #461

Answered by plyfager
xiaojifu asked this question in How-to
Discussion options

You must be logged in to vote

Hi @xiaojifu , you may modify the test_pipeline in your config this way.

test_pipeline = [
    dict(
        type='LoadImageFromFile',
        io_backend='disk',
        key='pair',
        domain_a=domain_a,
        flag='color'),
    dict(
        type='Resize',
        keys=[f'img_{domain_a}'],
        scale=(256, 256),
        interpolation='bicubic'),
    dict(type='RescaleToZeroOne', keys=[f'img_{domain_a}']),
    dict(
        type='Normalize',
        keys=[f'img_{domain_a}'],
        to_rgb=False,
        **img_norm_cfg),
    dict(type='ImageToTensor', keys=[f'img_{domain_a}']),
    dict(
        type='Collect',
        keys=[f'img_{domain_a}'],
        meta_keys=[f'img_{domain_a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zengyh1900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
How-to
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #312 on October 12, 2022 11:25.