Finetuning on new dataset / Modify input images on the fly
See original GitHub issueHow can I modify images on the fly? Say I would like to set a certain area of the input images region to 0? Where in your code would I need to do the surgery for that?
Rather in the ImageReader
function where the image is loaded?
Or rather in the network graph itself, say by adding a layer after the data layer in DeepLabResNetModel
that multiplies elementwise with some mask?
Sorry for bothering you with this stupid question. I’m new to tensorflow. Also sorry for asking usage-question, but since your code differs quite a lot from the tensorflow tutorial code I don’t really know where else to turn for that question…Thanks a lot for providing the deeplab-resnet model for tensorflow!
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (10 by maintainers)
Top Results From Across the Web
Transfer learning and fine-tuning | TensorFlow Core
In this tutorial, you will use a dataset containing several thousand images of cats and dogs. Download and extract a zip file containing...
Read more >Fine-tune a pretrained model - Hugging Face
When you use a pretrained model, you train it on a dataset specific to your task. This is known as fine-tuning, an incredibly...
Read more >Change input shape dimensions for fine-tuning with Keras
In this tutorial, you will learn how to change the input shape tensor dimensions for fine-tuning using Keras. After going through this guide ......
Read more >Image Classification Transfer Learning and Fine Tuning using ...
We create the train and test datasets using the tfds.load() ... The input layer is first created with the shape set to (224,...
Read more >14.2. Fine-Tuning - Dive into Deep Learning
For example, although most of the images in the ImageNet dataset have nothing to do with ... Create a new neural network model,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are right. In the original code with the multiscale fusion, they have a batch_size of 1. In my version I had the multiscale part removed so I could have a batch_size of 3. Sorry for the confusion.
I’m not so sure about the indvidual losses for the different branches. Do they simply add them to the gradients during backpropagation or how do they combine them?
Good idea with the update_scale / param_scale! I’ll check that. By the way: I updated my preprocessing to random cropping and 0-padding (images) / ignore_label-padding (labels). It gave me a huge boost (+10 % accuracy) on my other datasets (CamVid and Cityscapes). So although this might not be very important for Pascal Voc12, it apparantly is for other datasets.
Here is how I preprocess images at the moment:
using
and for cropping with padding
Mind that the padding for the labels has to be done with “ignore_label”. Since TF only performs a 0-padding I’m subtracting the ignore_label from label and add it again after the padding.
Thanks to your help I modified the initialization part thus:
Now the network is compiling and starting to train, however the network is not converging (not even on Voc12 itself without having changed the number of classes). The loss is decreasing a bit in the beginning but remains on a high level. When looking at the output pictures one can see that the network first predicts noise and then only predicts the background class for all images (which is probably the dominant class in Voc12)
tf.train.AdamOptimizer
is the wrong optimizer here? (I remember that in Deeplab-Caffe it was some Gradient-Descent with Momentum)Thanks a lot for your help so far. Again sorry for annoying you with this problem but I’m close to giving up 😕