need guidance on using pre-trained weights in segmentation_models API [closed] - tensorflow

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to use a pre-trained Unet model using segmentation_models API for the Cityscapes dataset, but I need the pre-trained weights for the same. Where can I find the pre-trained weights for a Unet model trained on the Cityscapes dataset?
Please guide me on this!!!

UNet is absent from the benchmark so i assume it is not adapted for this dataset (too slow and not enough performant probably). However, I advise you to start with DeepLabv3+ from Google which is not so complicated and more adapted for this dataset.
You can use this repository where it is implemented, well documented and useable with pretrained weights from cityscape dataset (and also PascalVOC dataset).

Related

Pretrained alexnet in tensorflow [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 12 months ago.
Improve this question
I want to use pretrained Alexnet for transfer learning. I dont see its available in Keras library.
Am I missing something here?
Other Alternative I see here is to create model and
load pretrained weight
train from scratch
Training from scratch using imagenet dataset is not possible for me due to resource constraint.
Loading pre-trained weight will work.
Would you provide any pointers for getting the pretrained weight for Alexnet?
Thanks,
As of right now, Keras does not (officially) seem to offer a pre-trained AlexNet model. PyTorch, on the other hand, does. If you are willing to use a different framework for the task, you can use PyTorch. You can retrieve a pre-trained version of the AlexNet like so:
import torchvision.models as models
alexnet = models.alexnet(pretrained=True)
You can find the list of available pre-trained models here, and a transfer learning tutorial for image classification here.
Hope that answers your question!

How to use Variational Autoencoder as a Feature Extractor? [closed]

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 2 years ago.
Improve this question
I want to use my VAE trained on an image dataset as a feature extractor for another task, so that I could for example replace a ResNet for feature extraction with my VAE.
Which Layers do I use for this?
With "standard" autoencoders you just take the encoding network, but since the latent layer of the VAE consist of mean and distribution I do not know which layers I should use for feature extraction.
Does somebody know how to use a VAE as a feature extractor and what to consider with using different components?
Hidden variables z are used in VAEs as the extracted features for dimensionality reduction. Here is an example dimensionality reduction from four features in the original space ([x1,x2,x3,x4]) to two features in the reduced space ([z1,z2]) (source):
Once you have trained the model, you can pass a sample to the encoder it extracts the features. You may find a Keras implementation example on mnist data here (see the plot_label_clusters function):

Machine learning - Train medical image [closed]

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 3 years ago.
Improve this question
I am trying to create Deep Neural Network based classifier for chest x-ray to check there is TB or not. I read that transfer Learning technique can be used for this using inception model v3. My question is inception model is created by training with imagenet(physical object) right? How can this be used for medical image training?
One intuition is that physical objects and medical images do share some similarities especially in low-level features such as edges, curves and small object regions.
Experiments indicate that pretraining a network on ImageNet can benefit most computer vision tasks even if the images from the target domain look very different from what are in the ImageNet.
To achieve best performance, you can use a pretrained network from Imagenet and fine-tune the last layer or all layers with small learning rates on your dataset.

why can't I reimplement my tensorflow model with pytorch? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am developing a model in tensorflow and find that it is good on my specific evaluation method. But when I transfer to pytorch, I can't achieve the same results. I have checked the model architecture, the weight init method, the lr schedule, the weight decay, momentum and epsilon used in BN layer, the optimizer, and the data preprocessing. All things are the same. But I can't get the same results as in tensorflow. Anybody have met the same problem?
I did a similar conversion recently.
First you need to make sure that the forward path produces the same results: disable all randomness, initialize with the same values, give it a very small input and compare. If there is a discrepancy, disable parts of the network and compare enabling layers one by one.
When the forward path is confirmed, check the loss, gradients, and updates after one forward-backward cycle.

How to select deep learning library and CNN architecture? [closed]

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 4 years ago.
Improve this question
I am new in the deep learning, and I want to use convolutional neural networks (CNN) for image recognition (biometric images).
I would like to use pre-trained CNN architecture and use a python programming language.
How can I select the suitable CNN architecture (VGGNet or GoogleNet ...), is there a preferable CNN architecture?
What do you think is the best library to do this work, how can I select the suitable library?
Thanks..
You can use tensorflow-slim. They have a library of many top pre-trained CNN models that you can use directly or fine-tune easily on your dataset. I think the training time depends on your hardware and amount of data you have.