Comments (10)
This is because the (default) discriminator is a "PatchGAN" (Section 2.2.2 in the paper). This discriminator slides across the generated image, convolutionally, trying to classify if each overlapping 70x70 patch is real or fake. This results in a 30x30 grid of classifier outputs, each corresponding to a different patch in the generated image.
from pix2pix.
@phillipi If I want to classify each overlapping a minor patch eg. like 16 x 16 patch is real or fake, should this results in a which size grid of classifier outputs? any formula or hints can provide?
from pix2pix.
You can use this script to determine the receptive field (e.g., 16 x 16) of a given architecture:
https://github.com/phillipi/pix2pix/blob/master/scripts/receptive_field_sizes.m
I'm not sure what the formula would be for calculating output grid size given desired receptive field. For a given architecture, you can always check the output size by running it on an image and calling out:size()
on the output out
.
from pix2pix.
@phillipi Thank you for you quick response. I am not familiar with the Matlab. Would you please be more specify how can I get the output with the script you provided. Thank you so much.
from pix2pix.
That script gives you the receptive field of a neuron. The equation to compute the input receptive field size from a given output receptive field size is (for a single convolutional layer):
input_size = (output_size - 1) * stride + kernel_size
You can call this recursively to compute the receptive field sizes across multiple layers.
from pix2pix.
@phillipi Thank you for you kind explanation. I am sorry that I didn't define my question well. The problem is when I use 70*70 patch GAN as discriminator in code, the output is not as sharp as what described in the paper in some occasion.
This looks good, but my results is not sharp enough as sample
So I wonder maybe the patch GAN size as default code is 70*70 is too large for the discriminator to classify the fake or real. If I want to enhance the sharpness should I enlarge the patch size or decrease the patch size? or any other suggestions ?
from pix2pix.
@kenshinzh what's your input and output? To produce good colorization results, one needs to map L
to ab
. Look at Notes on Colorization for more details.
from pix2pix.
Actually, my experments is from a B2A direction which is not the color corrections. I just take this B/W for illustration. all the input image is as the demo 256*256
from pix2pix.
In the colorizations in the paper, we concatenate the predicted ab
map with the ground truth L
. This has the effect of making the results look nice and crisp since most of the high frequencies are in the L
channel. If you just look at the raw predicted ab
it tends to look less sharp.
I don't think there is a simple relationship between discriminator patch size and and sharpness. In practice 70x70 usually works pretty well for me, but you could try a few variants to see what works in your application.
from pix2pix.
from pix2pix.
Related Issues (20)
- can i change the input of discrime-net ?
- Question: Running [make_dataset.py] with the sample data set causes an error HOT 1
- About use my own dataset for test
- Input to generator
- pix2pix with 16-bit channels? HOT 1
- RuntimeError
- fcn-8s-cityscapes weight link failure HOT 3
- How should I modify the model(G and D) structure if my input are all one-hot encoded matrix(3-D tensor) which only contains either 0 or 1 HOT 1
- Size for evaluation in Photo2Label task with cityscapes datasets HOT 1
- the code for evaluation in Photo2label of datasets-cityscapes might be wrong? HOT 1
- pytorch or tensorflow??? HOT 1
- Getting Started Installation Instructions. HOT 2
- About the receptive field of the discriminator achitecture HOT 2
- Easy idea about increasing pix2pix target underestanding HOT 1
- something to help people visualise)
- How to make Custom Pix2Pix model, please use if you want
- If it's possible to modify pix2pix for the vector but not image data? HOT 3
- hi is any one online here? please ping me i want to discuss the issues i am facing while installing the torch requirements HOT 4
- Google Colab Notebook
- Take two inputs for one output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pix2pix.