junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.09k stars 6.32k forks source link

How to finish Scene Text Editing task using Pix2Pix #1641

Open keepcoding123 opened 7 months ago

keepcoding123 commented 7 months ago

I want to finish Scene Text Editing task using Pix2Pix, just like this:

Snipaste_2024-03-30_17-46-50

It is a figure from Editing Text in The Wild

The author of this article using Pix2Pix to finish Scene Text Editing, and here is the statement:

Snipaste_2024-03-30_17-48-21

But I don’t quite understand the text in the red area.

I have already prepared style image, target text image, and the target style image, just like the following:

Snipaste_2024-03-30_18-02-17

How should I connect the style image and the target text image in depth, and then feed them into Pix2Pix network?

What I have done is as follows:

1.Put style image in /path/to/data/A/train, /path/to/data/A/val, /path/to/data/A/test

2.Put target style image in /path/to/data/B/train, /path/to/data/B/val, /path/to/data/B/test

3.Run python datasets/combine_A_and_B.py --fold_A /path/to/data/A --fold_B /path/to/data/B --fold_AB /path/to/data

I want to know what to do next.

Can someone help me?