Hot answers tagged

18 votes
Accepted

How to measure the similarity between two images?

Check this handout! Well, there a few so... lets go: Given two images $J[x,y]$ and $I[x,y]$ with $(x,y) \in N^{N \times M}$... A - Used in template matching: Template Matching is linear and is not ...
Pedro Henrique Monforte's user avatar
5 votes
Accepted

Why do we need to concatenate in a U-Net?

These types of connections between layers are called skip connections, searching for this will give you a way to find more in-depth information. Broadly speaking, there are two advantages to using ...
Oxbowerce's user avatar
  • 7,157
5 votes
Accepted

How can I plot/display a dataset or an image distribution?

I want to view a specific image or a dataset's distribution, and see if they are different. Does this do the trick? It depends what you want to understand or learn about your data. what does ...
n1k31t4's user avatar
  • 14.7k
4 votes
Accepted

How to remove the hotspots from given image by using Python and opencv?

Based on this answer's algorithm I have written my code which is working as intended. Here's a breakdown of the coding steps: Otsu's thresholding is applied to the grayscale ...
S. M.'s user avatar
  • 173
3 votes

Difference between grayscaled and binary mnist dataset

MNIST is not an interesting data set. You use MNIST to learn how to do machine learning that you will you on interesting data sets. Thus... If you just want to figure out how to do the Keras code for ...
Dave's user avatar
  • 3,909
2 votes

Image Classification on non real images

This question is slightly philosophical, but can be explained in this way - If your model is trained on real photographs it will likely not generalize well to things like drawings unless they are ...
Ethan's user avatar
  • 1,635
2 votes

Does white balance correction improve the performance of visual object detection?

I don't know about any papers, though making your objects more distinct should definitely help your model to learn proper filters. One thing to keep in mind though is your production data. Will you be ...
Piotr Rarus's user avatar
2 votes

Multichannel numpy array to PIL image

Try specifying mode so that PIL is aware of data format. img = Image.fromarray(source_array, mode="CMYK") If that does not work, what is the shape of source ...
Shamit Verma's user avatar
  • 2,239
2 votes

CycleGAN: Generator losses don't decrease, discriminators get perfect

This usually happens when your discriminator starts to just understand that the difference between your generated(fake) and real samples only differ by some n/255 factor. This is easy to learn, and if ...
ZeroDay Fracture's user avatar
2 votes

how to reconstruct image from feature space of convolutional neural network?

One choice is to train a neural network model to take these values and output original images. Notice that usually some data is loss in this process so it might be impossible to reconstruct the image ...
Pedro Henrique Monforte's user avatar
2 votes
Accepted

How can my Pytorch based GAN output pure B&W with no grayscale?

The output is going to be "continuous" if you don't use it for "classification". You can follow few approaches here: This would be the simplest approaches but you probably need some post processing ...
Pedro Henrique Monforte's user avatar
2 votes

How to remove the hotspots from given image by using Python and opencv?

Can you try the following approach using OpenCV The logic behind this is: Convert the image to grayscale. Apply a Gaussian blur to the image to smooth out the edges. Threshold the image to create a ...
Multivac's user avatar
  • 2,909
1 vote

Validation Loss Not Increasing

When training on a small sample, the network will be able to overfit to achieve perfect training loss. However, overfitting may not be required for achieving an optimal training loss. The premise that ...
Scriddie's user avatar
  • 121
1 vote

Image Preprocessing

I did this implementation, #img = [w,h,c] numpy array of image out = img == [0,0,0] np.sum(np.sum(out,axis=1) == 3) Its working. Let me know in case we can ...
vipin bansal's user avatar
  • 1,252
1 vote

Get specific object dimensional position from image

Assuming you already have a logo sample to detect. In that case you can use OpenCV template detection. You need to pass source logo and target image. Link - Template Matching using OpenCV
Sonu's user avatar
  • 106
1 vote

Image Super-resolution Connecting Subimages

You're probably seeing those artifacts because your model doesn't see those pixels immediately outside your tile and so can't know how to "blend" things. (I'm assuming your tiles have a ...
bogovicj's user avatar
  • 699
1 vote

How to understand image of Fourier transform?

The lines connecting the ends seem also parallel to existing lines with a similar pattern but faded a lot more. I think they are the 2D equivalent of harmonics. Maybe start with a generated straight ...
Pieter21's user avatar
  • 1,041
1 vote

how to see decision tree when running in anaconda?

Below is my code for visualizing a decision tree. Hope it helps.
FrancoSwiss's user avatar
  • 1,057
1 vote

How important is the channel order in deep-learning computer vision tasks?

Would I be able to use BGR images for an RGB-trained network? I think the performance will be much worse than RGB input. Color Permutations as augmentation Paper Rethinking Data Augmentation: Self-...
Good Pen's user avatar
  • 117
1 vote

How important is the channel order in deep-learning computer vision tasks?

Task dependent but could be important. Lets find some arbitrary representation that separates luminance from chrominance (represented as a color 2D vector)? That way, you are detecting bright objects ...
Noah Weber's user avatar
  • 5,629
1 vote
Accepted

Are Deep Neural Networks limited to grayscale images depending on whether you use Seq. or Func. API?

The answer is no, they are not limited. However, your statements seem to contain multiple misunderstandings, so let's first clarify them: The sequential and functional APIs in Keras are different ...
noe's user avatar
  • 23.8k
1 vote
Accepted

Will images modification get me a better machine learning model?

One can never 100% say that a data preprocessing approach will yield positive results. So, if you are trying different things, always test and use the metrics to see what works best. With that said, ...
Valentin Calomme's user avatar
1 vote

Improving the pix2pix Architecture for Sketch to Image Translation on a Dataset of Sketches of People to Photos of People

I managed to obtain better results with less artifacts by implementing the code of the paper "High-Quality Facial Photo-Sketch Synthesis Using Multi-Adversarial Networks". I found this code ...
Lukas's user avatar
  • 131
1 vote
Accepted

distribution difference between image and text

Suppose you trained two identical neural nets on different datasets. Network A is trained using a dataset of cat pictures. Network B is trained using a dataset of traffic sign images. Because the ...
zachdj's user avatar
  • 2,654
1 vote

Image regression problem

Couple of Things straight up: Inject some noise in the process. When the gan or autoencoder learns that there is some noise it will start to generalise better Use weaker architectures. (Analogy to ...
Noah Weber's user avatar
  • 5,629
1 vote
Accepted

how to scale a dataset contains a b&w and Grayscale images

$\hat{p}=2\big(\frac{p}{p_{max}}\big)-1$ so that $\hat{p}\in [-1,1]$ where $p\in[0,p_{max}]$ E.g. with 8-bit channels, $p_{max}=255$, black/white correspond to $-1$ and $1$ respectively, and grayscale ...
Ben's user avatar
  • 2,522
1 vote
Accepted

How to build a database of image data for machine learning?

There are several approaches to this as you need both the input (images) and if your problem is a classification one, you need to reliably store the labels. You might also have some additional ...
RonsenbergVI's user avatar
1 vote
Accepted

Is DQN limited to working with only image frames?

DQNs don't only accept image frames as input. For instance, this DQN for the CartPole environment takes in a state with only 4 elements (the position and velocity of the cart and the angle and ...
Olivia Watkins's user avatar
1 vote

Classifying whether a chess board square contains a piece or not?

If it's a screenshot of a computer game, where each constituent has purely that box, that is by default any given box is white or black. then, any simple matrix operation like, variance of color in ...
Itachi's user avatar
  • 251

Only top scored, non community-wiki answers of a minimum length are eligible