deep-learning

Why Dice Coefficient and not IOU for segmentation tasks?

前提是你 提交于 2021-02-08 08:47:24
问题 I have seen people using IOU as the metric for detection tasks and Dice Coeff for segmentation tasks. The two metrics looks very much similar in terms of equation except that dice gives twice the weightage to the intersection part. If I am correct, then Dice: (2 x (A*B) / (A + B)) IOU : (A * B) / (A + B) Is there any particular reason for preferring dice for segmentation and IOU for detection? 回答1: This is not exactly right. The Dice coefficient (also known as the Sørensen–Dice coefficient

Why Dice Coefficient and not IOU for segmentation tasks?

柔情痞子 提交于 2021-02-08 08:47:14
问题 I have seen people using IOU as the metric for detection tasks and Dice Coeff for segmentation tasks. The two metrics looks very much similar in terms of equation except that dice gives twice the weightage to the intersection part. If I am correct, then Dice: (2 x (A*B) / (A + B)) IOU : (A * B) / (A + B) Is there any particular reason for preferring dice for segmentation and IOU for detection? 回答1: This is not exactly right. The Dice coefficient (also known as the Sørensen–Dice coefficient

Is it possible to create multiple instances of the same CNN that take in multiple images and are concatenated into a dense layer? (keras)

岁酱吖の 提交于 2021-02-08 07:21:35
问题 Similar to this question, I'm looking to have several image input layers that go through one larger CNN (e.g. XCeption minus dense layers), and then have the output of the one CNN across all images be concatenated into a dense layer. Is this possible with Keras or is it even possible to train a network from the ground-up with this architecture? I'm essentially looking to train a model that takes in a larger but fixed number of images per sample (i.e. 3+ image inputs with similar visual

How to use pytorch to construct multi-task DNN, e.g., for more than 100 tasks?

瘦欲@ 提交于 2021-02-08 06:25:15
问题 Below is the example code to use pytorch to construct DNN for two regression tasks. The forward function returns two outputs (x1, x2). How about the network for lots of regression/classification tasks? e.g., 100 or 1000 outputs. It definitely not a good idea to hardcode all the outputs (e.g., x1, x2, ..., x100). Is there an simple method to do that? Thank you. import torch from torch import nn import torch.nn.functional as F class mynet(nn.Module): def __init__(self): super(mynet, self)._

What does the coordinate output of yolo algorithm represent?

戏子无情 提交于 2021-02-08 05:16:57
问题 My question is similar to this topic. I was watching this lecture on bounding box prediction by Andrew Ng when I started thinking about output of yolo algorithm. Let's consider this example, We use 19x19 grids and only one receptive field with 2 classes, so our output will be => 19x19x1x5. The last dimension(array of size 5) represents the following: 1) The class (0 or 1) 2) X-coordinate 3) Y-coordinate 4) height of the bounding box 5) Width of the bounding box I don't understand whether X,Y

is there a nice output of Keras model.summary( )?

我的未来我决定 提交于 2021-02-08 04:51:32
问题 is it possible to have a nice output of keras model.summary(), that can be included in paper, or can be ploted in a nice table like this. 回答1: You need to install graphvis and pydot, but you might like the results from this. It doesn't make a table but the graph is much better in my opinion. from keras.utils import plot_model plot_model(model, to_file='model.png', show_shapes=True,show_layer_names=True) But you would have to make properly named sub models if you want to nest the several

Why gradient of tanh in tensorflow is `grad = dy * (1 - y*y)`

倖福魔咒の 提交于 2021-02-08 04:46:24
问题 tf.raw_ops.TanhGrad says that grad = dy * (1 - y*y) , where y = tanh(x) . But I think since dy / dx = 1 - y*y , where y = tanh(x) , grad should be dy / (1 - y*y) . Where am I wrong? 回答1: An expression like dy / dx is a mathematical notation for the derivative, it is not an actual fraction. It is meaningless to move dy or dx around individually as you would with a numerator and denominator. Mathematically, it is known that d(tanh(x))/dx = 1 - (tanh(x))^2 . TensorFlow computes gradients

Converting .mat file extension image to .jpg via python

自古美人都是妖i 提交于 2021-02-08 03:31:32
问题 I'm currently trying to converting the images from a .mat file to .jpg file downloaded from this site- BrainTumorDataset. All the files contained in the directory are .mat files, now I want to convert all the files in .jpg format via python for making a project(Brain Tumor Classification using Deep Neural Net) via CNN. I searched in google but then I didn't get anything from there, only some topics on how to load .mat file in python but that also didn't help me. I found an answer in

Cannot import multi_gpu_model from keras.utils

狂风中的少年 提交于 2021-02-08 03:28:05
问题 I have tensorflow-gpu 1.2.1 and keras on ubuntu 16.04. I am not able to perform: from kears.utils import multi_gpu_model Has anyone had success with multi_gpu_model as described in their documentation's FAQ section? I have a 4 GPU machine with 4 GeForce GTX 1080 Ti cards and want to use all of them. Here's the error I get: import keras.utils.multi_gpu_model --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)

Plot validation loss in Tensorflow Object Detection API

做~自己de王妃 提交于 2021-02-08 03:27:47
问题 I'm using Tensorflow Object Detection API for detection and localization of one class object in images. For these purposes I use pre-trained faster_rcnn_resnet50_coco_2018_01_28 model. I want to detect under/overfitting after training of the model. I see training loss, but after evaluating Tensorboard only shows mAP and Precision metrics and no loss. Is this possible to plot a validation loss on Tensorboard too? 回答1: There is validation loss. Assuming you're using the latest API, the curve