I want to do semantic segmentation of mapillary dataset. Is csv mandatory to create for the same? - tensorflow

I am a beginner to EndtoEnd learning. There is no .csv file in mapollary dataset. I want to know do I need .csv file and if so why .csv file is needed for image segmentation?
Can anyone share link for beginner for semantic segmentation as I am not able to decide how to do classes for labels in images.
I want to do semantic segmentation of image dataset. I am not able to understand how to labels like vehicle, road etc. in python. I want to use CNN with tensorflow and keras model.

Related

How can I create a generator for preprocessing an image and text input model of deep learning?

So I made two different models, one for categorization using image only and another with text.
I'm trying to create a new one combining both inputs with a 'concatenate' layer but I different tries of different generators failed me.
Here's a picture of my model architecture:
architecture
I stored the images and corresponding texts in the same folder, each one named accordingly (12.txt goes with 12.jpeg).
Any help would be deeply appreciated.
For the single input models, I used Keras flow_from_directory and text_from_directory.
The custom generator I tried to make for images failed when I tried to split into train and val.

Having a trained classifier like VGG16 how to automate image segmentation?

I Have a trained classifier: VGG16 on say Image Net (or my own images DB and classes). I want to segment my images automatically knowing there are classes on images my classifier knows. How to automate image segmentation?
For this you can extract Grad-CAM features. Kears already has published an official documentation for Grad-CAM extraction you can find it here.
So for your task steps need to followed are
Extract Grad-CAM from the images
Based on Grad-CAM create a segmentation mask using simple image processing technique
In this method you can easily create segmentation mask for images but masks may not be so accurate . Beacuse, see this picture,
it is for Xception model (ImageNet).
Hope you will understand and you will be helpful.

How to build tensorflow object detection model for custom classes and also include the 90 classess the SSD Mobilenet model contains

I am building a new tensorflow model based off of SSD V1 coco model in order to perform real time object detection in a video but i m trying to find if there is a way to build a model where I can add a new class to the existing model so that my model has all those 90 classes available in SSD MOBILENET COCO v1 model and also contains the new classes that i want to classify.
For example, I have created training data for two classes: man, woman
Now, I built a new tensorflow model that identifies a man and/or woman in a video. However, my model does not have the other 90 classes present in original SSD Mobilenet model. I am looking for a way to concatenate both models or pass more than one model to my code to detect the objects.
If you have any questions or if I am not clear, please feel free to probe me further.
The only way i find is you need to get dataset of SSD Mobilenet model on which it was trained.
Make sure all the images are present in one directory and annotations in another directory.
We should have a corresponding annotation file for each image file
ex: myimage.jpg and myimage.xml
If all the images of your customed dataset are of same formate with SSD Mobilenet model then annotate it with a tool called LabelImg.
Add that images and annotated files to respective images and annotations directory where we have already saved SSD Mobilenet.
Try regenerate new TFrecord and continue with remaining procedure on it.
You can use transfer learning with Tensorflow API.
Transfer learning allows you to load re-trained network and modify the fully connected layer by introducing your classes.
There is full description for this in the following references:
Codelab
A good explanation here
Tensorflow API here for more details
Also you can use google cloud platform for better and faster results:
I wish this helps you.
I don't think there is a way you can add your classes to the existing 90 classes without using the dataset it is previously trained with. Your only way is to use that dataset plus your own and retrain the model.

where is the graph file of open images pretrained model?

I need the graph file(.pb file) of pretrained openimages dataset. After downloading the model there are only 3 files
labelmap.txt
model.ckpt
model.ckpt.meta
Where can I find the .pb file?
The model.ckpt.meta contains both the graph and the weights. you have to import it using import_metagraph functionality.
Then you should be able to export the graph defn in pb format, if you really need it.
However I was unable to load the ckpt.meta, due to a google-specific op defined in the model. Please let me know if you can figure that out.

mnist and cifar10 examples with TFRecord train/test file

I am a new user of Tensorflow. I would like to use it for training a dataset of 2M images. I did this experiment in caffe using lmdb file format.
After reading Tensorflow related posts, I realized that TFRecord is the most suitable file format to do so. Therefore, I am looking for complete CNN examples which use TFRecord data. I noticed that the image related tutorials (mnist and cifar10 in link1 and link2) are provided with a different binary file format where the entire data-set is loaded at once. Therefore, I would like to know if anyone knows if these tutorials (mnist and cifar10) are available using TFRecord data (for both CPU and GPU).
I assume that you want to both, write and read TFRecord files. I think what is done here reading_data.py should help you converting MNIST data into TFRecors.
For reading it back, this script does the trick: fully_connected_reader.py
This could be done similarly with cifar10.