GithubHelp home page GithubHelp logo

rishit-dagli / visualize.ai Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 45 KB

An API to better understand and visualize the inner workings of a CNN with GradCam; currently MobileNet

License: Apache License 2.0

Python 100.00%
gradcam-heatmap gradcam machine-learning tensorflow python

visualize.ai's Introduction

Visualize.AI

Run in Postman Lint Code Base Code style: black

GitHub license GitHub stars GitHub forks

This repo creates an API to better understand and visualize the inner workings of a CNN with GradCam; currently MobileNet powered by TensorFlow and Google Cloud Functions. This also shows using the Postman Visualizer to make sense of the API responses and visualize the journey of an image in the model.

Run Locally

To get up and running with this API, run the following commands, make sure you have Python installed. This runs the function in built-in local development server:

git clone https://github.com/Rishit-dagli/Visualize.AI # or clone your own fork
cd Visualize.AI
pip install -r requirements.txt
functions-framework-python --target conv_vis
# Can also use --debug

Your function should now be running on localhost:8080 ๐Ÿš€.

About the API๐Ÿ“

This API was deployed on GCP Cloud Functions and is extremely easy to deploy your own such API. You can simply deploy it to your own Cloud Function with this command:

gcloud functions deploy conv_vis \
--runtime python38 \
--memory 8196MB \
--trigger-http \
--allow-unauthenticated

Or even do this with the Google Cloud GUI.

Using the API

Endpoint URL

https://us-central1-sound-fastness-257416.cloudfunctions.net

Request Params

Key Description
image URL of the image you put in the model
destination File name of the destination image, remember to use extension (.png , .jpg etc)

Just want to test out?

I got you covered, I have added an example image as the default value for you to try out here are the default values:

Key Default Value
image https://i.imgur.com/taUKyu1.jpg
destination A random string

Lint โœ…

This project uses GitHub Super Linter which is Combination of multiple linters to install as a GitHub Action.

Following Linters are used internally by super linter (enabled for this project):

Want to Contribute ๐Ÿ™‹โ€โ™‚๏ธ?

Awesome! If you want to contribute to this project, you're always welcome! See Contributing Guidelines. You can also take a look at Visualize.AI's Project Issues for getting more information about current or upcoming tasks.

Want to discuss? ๐Ÿ’ฌ

Have any questions, doubts or want to present your opinions, views? You're always welcome. You can start discussions.

Citations

@article{Selvaraju_2019,
   title={Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization},
   volume={128},
   ISSN={1573-1405},
   url={http://dx.doi.org/10.1007/s11263-019-01228-7},
   DOI={10.1007/s11263-019-01228-7},
   number={2},
   journal={International Journal of Computer Vision},
   publisher={Springer Science and Business Media LLC},
   author={Selvaraju, Ramprasaath R. and Cogswell, Michael and Das, Abhishek and Vedantam, Ramakrishna and Parikh, Devi and Batra, Dhruv},
   year={2019},
   month={Oct},
   pages={336โ€“359}
}

License

Copyright 2020 Rishit Dagli

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

visualize.ai's People

Contributors

rishit-dagli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hercules261188

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.