faizanahemad / FastNet

API layer built on tensorflow-2.0 for high performance and easy training
3 stars 2 forks source link

Add Visualization of Classification Results with GradCam #2

Open faizanahemad opened 4 years ago

faizanahemad commented 4 years ago

Proposed Features

How the API looks like?

def visualize_results(model, dataset, class_names, layer=None, enable_gradcam=False,
                       actual_class=None, predicted_class=None,show_misclassified=False,show_correct=False,
                       examples=25,examples_per_row=5, image_size_multiplier=3,
                       show_actual=True, show_heatmap=False, show_superimposed=True, show_probability_histogram=False):
    ## Code here

Intended Usage Once model is trained this function can be called with Model and dataset to visualize.

Limitations

Online References/Documentation was referred while making this API

Branch Name (The github branch in which you are working on this).

Note: Before raising a PR make sure that you have made an issue like this with tag: enhancement, ensure your code is tested and documented.

faizanahemad commented 4 years ago

Note: this task requires reading a lot of code

unography commented 4 years ago

I just had a suggestion, can we use Python 3's type annotation everywhere? That would make functions little easier to read?

something like -

import tensorflow as tf
from typing import List

def visualize_results(model: tf.keras.Model, class_names: List[str]):
    return
faizanahemad commented 4 years ago

Yes @unography that would be good. You can edit the original task with these annotations

faizanahemad commented 4 years ago

Break this into Subtasks if this seems too big to do by 1 person or in 1 week.