C4W3L01 Object Localization
Why Stack Overflow recommends it
Stack Overflow users link it when building or debugging object localization and YOLO-style models, especially to justify how to set up the output vector and a combined classification and regression loss.
Recommended by 1 people across 1 different months, 2019 to 2021.
What it is
A short lecture from Andrew Ng's Deep Learning Specialization (Course 4, Week 3) introducing object localization with convolutional networks. It covers how to output a bounding box alongside a class label and how to define the target vector and loss for that task.
What people said
Recommends Eshaka · 2019-12 · Stack Overflow · on “How to make a custom loss function in Keras properly”
i was trying to implement a basic yolo algorithm according this video, you can take a look, it explains the loos function that i am trying to implement. [this video]
Cites mrWOLOLO · 2019-01 · Stack Overflow · on “convolutional neural network for object localization”
I saw in deep learning course by Andrew Ng a way to localize single object on image : [this video] . As I understand it, you can for example bound a point to specific part of the object, take coordinates: x, y as labels y and train CNN. I wanted to train a CNN neural network to localize my eyes (not clasiffication). I took 200 photos of me: 60x60 pixels in gray scale. I labeld left and right eye, Each coordinate of labeled eye was normalized to 0-1. The y label is : [x of eye1, y of eye1, x of eye2, y of eye2]. I used SGD optimazer with mse loss and in the output layer sigmoid function. model = tf.keras.models.Sequential() model.add(tf.keras.layers.Conv2D(64, (3,3), input_shape= (60,60, 1))) mode
Cites Snake Verde · 2019-06 · Stack Overflow · on “Which loss function to use when there are many outputs?”
As stated by Siddharth, you'll use two loss functions, since you have a regression problem and a classification problem. See [this video] for more details. Particularly, pay attention to this slide: [LINK] That is, the first task simply classifies if the object is present (logistic regression loss) and the second task finds the bounding boxes (square error loss).
Cites statsNoob · 2021-03 · Stack Overflow · on “Pytorch - Loss for Object Localization”
I am trying to perform an object localization task with MNIST based on Andrew Ng's lecture here [this video] . I am taking the MNIST digits and randomly placing them into a 90x90 shaped image and predicting the digit and it's center point. When I train, I am getting very poor results and my question is about whether or not my loss function is set up correctly. I basically just take the CrossEntropy for the digit, the MSE for the coordinates, and then add them all up. Is this correct? I don't get any errors, but the performance is just horrendous. My dataset is defined as follows (which returns the label and the x y coordinates of the center of the digit): class CustomMnistDataset_OL(Dataset): def