Questions tagged [convolutional-neural-network]

257 questions
31
votes
4 answers

In Keras, how to get the layer name associated with a "Model" object contained in my model?

I built a Sequential model with the VGG16 network at the initial base, for example: from keras.applications import VGG16 conv_base = VGG16(weights='imagenet', # do not include the top, fully-connected Dense layers …
Ryan Chase
  • 1,894
  • 3
  • 19
  • 29
17
votes
2 answers

Difference between Dense(2) and Dense(1) as the final layer of a binary classification CNN?

In a CNN for binary classification of images, should the shape of output be (number of images, 1) or (number of images, 2)? Specifically, here are 2 kinds of last layer in a CNN: keras.layers.Dense(2, activation =…
10
votes
3 answers

YOLO object detection: how does the algorithm predict bounding boxes larger than a grid cell?

I am trying to better understand how the YOLO2 & 3 algorithms works. The algorithm processes a series of convolutions until it gets down to a 13x13 grid. Then it is able to classify objects within each grid cell as well as the bounding boxes for…
9
votes
2 answers

Intuition behind U-net vs FCN for semantic segmentation

I don't quite understand the following: In the proposed FCN for Semantic Segmentation by Shelhamer et al, they propose a pixel-to-pixel prediction to construct masks/exact locations of objects in an image. In the slightly modified version of the…
9
votes
3 answers

Will jpeg compression affect training and classification using Convolutional Neural Networks

We are working with a company that has more than 2 million images in jpeg. They want to collect more images. The purpose of the images are machine classification and to find small objects like bolts and small water leaks. the number of images are…
8
votes
2 answers

Suggested CNN Frameworks for Object Detection in Satellite Imagery?

I'm looking to detect boats in large satellite scenes of the ocean. I'm successfully applied matterport's Mask-RCNN setup on small subsets of satellite imagery but it is way too slow to analyze huge images like WorldView. I'm looking for something…
7
votes
3 answers

Number of feature maps produced after each convolution layer in CNN's

My question is about number of feature maps after each convolution layer. Based on my studies, in each Convolution layer, Based on filters that we want, In the exact number we get feature maps. But in some tutorials I encountered some architectures…
6
votes
5 answers

Reflection padding Conv2D

I'm using keras to build a convolutional neural network for image segmentation and I want to use "reflection padding" instead of padding "same" but I cannot find a way to to do it in keras. inputs = Input((num_channels, img_rows,…
6
votes
2 answers

Crop the center of the image in Keras ImageDataGenerator or flow_from_directory

I am trying to crop the center of the images in image data generator using keras. I have images of size 192x192 and I want to crop the center of them so that the output batches will be 150x150 or something similar. Could I do this immediately in…
5
votes
2 answers

How do I load up an image and convert it to a proper tensor for PyTorch?

I'm trying to custom load some image files (JPG files) with some labels and feed them into a convolutional neural network (CNN) in PyTorch following the example here. However, there still seem to be no decent end-to-end tutorials. The problem that I…
5
votes
2 answers

Load a single image in a pretrained pytorch net

Total newbie here, I'm using this pytorch SegNet implementation with a '.pth' file containing weights from a 50 epochs training. How can I load a single test image and see the net prediction? I know this may sound like a stupid question but I'm…
4
votes
2 answers

CNN return the same result for classification (keras)

I am using CNN to classify two types of pollen: sugi and hinoki. When I used the images taken in visible light as data, it predicted "sugi" for all the test images. In the other hand, when I used images taken in ultraviolet as data, it predicted…
4
votes
1 answer

How to Feed Batched Sequences of Images through Tensorflow conv2d

This seems like a trivial question, but I've been unable to find the answer. I have batched sequences of images of shape: [batch_size, number_of_frames, frame_height, frame_width, number_of_channels] and I would like to pass each frame through a few…
4
votes
1 answer

Extract features into a dataset from keras model

I use the following code (courtesy to here) which runs CNN for training MNIST images: from __future__ import print_function import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout,…
4
votes
1 answer

Custom convolution kernel and toroidal convolution in PyTorch

I want to do two things with a PyTorch convolution which aren't mentioned in the documentation or code: I want to create a convolution with a fixed kernel like this: 000010000 000010000 100010001 000010000 000010000 The horizontal aspect is like…
jmmcd
  • 604
  • 6
  • 15
1
2 3
17 18