conv-neural-network

U-net low contrast test images, predict output is grey box

十年热恋 提交于 2019-12-18 04:27:05
问题 I am running the unet from https://github.com/zhixuhao/unet but when I run the unet the predicted images are all grey. I get an error saying low contrast image for my test data, any one had or resolved this problem? I am training with 50 ultrasound images and get around 2000/3000 after augmentation, on 5 epochs with 300 steps per epoch and batch size of 2. Many thanks in advance Helena 回答1: After you made sure that your data pipeline is correct. There are a few things to consider here, I hope

Why is binary_crossentropy more accurate than categorical_crossentropy for multiclass classification in Keras?

若如初见. 提交于 2019-12-17 18:37:38
问题 I'm learning how to create convolutional neural networks using Keras. I'm trying to get a high accuracy for the MNIST dataset. Apparently categorical_crossentropy is for more than 2 classes and binary_crossentropy is for 2 classes. Since there are 10 digits, I should be using categorical_crossentropy . However, after training and testing dozens of models, binary_crossentropy consistently outperforms categorical_crossentropy significantly. On Kaggle, I got 99+% accuracy using binary

Keras ValueError: Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=5

不问归期 提交于 2019-12-17 18:28:16
问题 I have checked all the solutions, but still, I am facing the same error. My training images shape is (26721, 32, 32, 1) , which I believe it is 4 dimension, but I don't know why error shows it is 5 dimension. model = Sequential() model.add(Convolution2D(16, 5, 5, border_mode='same', input_shape= input_shape )) So this is how I am defining model.fit_generator model.fit_generator(train_dataset, train_labels, nb_epoch=epochs, verbose=1,validation_data=(valid_dataset, valid_labels), nb_val

Visualizing output of convolutional layer in tensorflow

风流意气都作罢 提交于 2019-12-17 15:22:24
问题 I'm trying to visualize the output of a convolutional layer in tensorflow using the function tf.image_summary . I'm already using it successfully in other instances (e. g. visualizing the input image), but have some difficulties reshaping the output here correctly. I have the following conv layer: img_size = 256 x_image = tf.reshape(x, [-1,img_size, img_size,1], "sketch_image") W_conv1 = weight_variable([5, 5, 1, 32]) b_conv1 = bias_variable([32]) h_conv1 = tf.nn.relu(conv2d(x_image, W_conv1)

how to calculate a net's FLOPs in CNN

纵然是瞬间 提交于 2019-12-17 10:54:15
问题 I want to design a convolutional neural network which occupy GPU resource no more than Alexnet.I want to use FLOPs to measure it but I don't know how to calculate it.Is there any tools to do it,please? 回答1: For online tool see http://dgschwend.github.io/netscope/#/editor . For alexnet see http://dgschwend.github.io/netscope/#/preset/alexnet . This supports most wide known layers. For custom layers you will have to calculate yourself. 回答2: For future visitors, if you use Keras and TensorFlow

Caffe | solver.prototxt values setting strategy

余生颓废 提交于 2019-12-17 04:32:44
问题 On Caffe, I am trying to implement a Fully Convolution Network for semantic segmentation. I was wondering is there a specific strategy to set up your 'solver.prototxt' values for the following hyper-parameters: test_iter test_interval iter_size max_iter Does it depend on the number of images you have for your training set? If so, how? 回答1: In order to set these values in a meaningful manner, you need to have a few more bits of information regarding your data: 1. Training set size the total

Keras' convolution layer on images coming from circular/cyclic domain [closed]

五迷三道 提交于 2019-12-14 03:46:55
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 months ago . The Need Hello, I am experimenting the usage of CNNs on images which come from a cylindric domain , so I am interested to apply the Convolution layer in a circular (or cyclic) way. I mean a convolution layer that instead of padding the image with zeros would just wrap around the

How to modify freezed layers in training using Tensorflow's Object Detection API?

痴心易碎 提交于 2019-12-14 03:09:59
问题 I am using Tensorflow's Object Detection API in training. In which file, the freezed layers are defined to fine-tune the model in training. I need to experiment changing freezed layers in fine-tuning. For example, if I use Resnet50 configuration, where I can change the freezed layers? 回答1: That certainly you can do. By reading the proto file for training, there is a field called freeze_variables , this is supposed to be a list containing all variables that you want to freeze, e.g. excluding

tf.nn.l2_normalize makes accurracy lower

谁说我不能喝 提交于 2019-12-14 02:28:58
问题 I'm trying to train a convolutional neural network similar to Facenet and Openface. My model is inspired by VGG-16 (posted below). The problem is that, when I use output = tf.nn.l2_normalize(output, 0) before returning the output, the accuracy drops significantly. I get near 98 percent accuracy without l2_normalize , however, the openface model described here uses it. These are my results with output = tf.nn.l2_normalize(output, 0) : epoch 0 loss 0.36241 acc 45.59 nr_test_examples 6400 total

tensorflow: batches of variable-sized images

二次信任 提交于 2019-12-13 15:00:47
问题 When one passes to tf.train.batch, it looks like the shape of the element has to be strictly defined, else it would complain that All shapes must be fully defined if there exist Tensors with shape Dimension(None) . How, then, does one train on images of different sizes? 回答1: You could set dynamic_pad=True in the argument of tf.train.batch. dynamic_pad : Boolean. Allow variable dimensions in input shapes. The given dimensions are padded upon dequeue so that tensors within a batch have the same