Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

Custom Network with Resnet, Densenet, Inception blocks
Latest   Machine Learning

Custom Network with Resnet, Densenet, Inception blocks

Last Updated on July 20, 2023 by Editorial Team

Author(s): Akula Hemanth Kumar

Originally published on Towards AI.

Making computer vision easy with Monk, low code Deep Learning tool and a unified wrapper for Computer Vision.

Have you ever thought of experimenting to build a network with different blocks from Resnet, Densenet, Inception, etc?

I am assuming that you are already familiar with the basics of computer vision. Before diving into it, make sure you know what’s Resnet, what’s Densenet, and what’s Inception.

Let’s get started

Table of Contents

  1. Installation
  2. Load Data
  3. Create and debug network
  4. Train

Installation

Install Monk, a low code Deep Learning tool and a unified wrapper for Computer Vision.

$git clone https://github.com/Tessellate-Imaging/monk_v1.git#Select the requirements file as per OS and CUDA version$cd monk_v1/installation/Linux && pip install -r requirements_cu9.txt

Load Data

Here we are using Stanford Dogs classification dataset.

$! wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1b4tC_Pl1O80of7U-PJ7VExmszzSX3ZEM' -O- U+007C sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1b4tC_Pl1O80of7U-PJ7VExmszzSX3ZEM" -O dogs-species-dataset.zip && rm -rf /tmp/cookies.txt

Create and debug network

Here we create a network and append resnet_v1_block and resnet_v2_block.

Debug Custom Model

$ gtf.debug_custom_model_design(network);
View From Bottom to Top

Next, we will append resnet_v1_bottleneck_block and resnet_v2_bottleneck_block

Debug Custom Model

$ gtf.debug_custom_model_design(network);
View From Bottom to Top

Here we will append densenet_block, inception_a_block and inception_c_block.

Debug Custom Model

$ gtf.debug_custom_model_design(network);
View From Bottom to Top

we flatten, add a fully connected layer, and followed by a fully-connected layer with a number of neurons(units) = number of classes in your custom dataset.

Debug Custom Model

$ gtf.debug_custom_model_design(network);
View From Bottom to Top

Visualize with Netron

Train

Set Epochs, Optimizer, losses and learning rate schedulers.

You can find the complete jupyter notebook on Github.

If you have any questions, you can reach Abhishek and Akash. Feel free to reach out to them.

I am extremely passionate about computer vision and deep learning. I am an open-source contributor to Monk Libraries.

You can also see my other writings at:

Akula Hemanth Kumar – Medium

Read writing from Akula Hemanth Kumar on Medium. Computer vision enthusiast. Every day, Akula Hemanth Kumar and…

medium.com

Photo by Hector Falcon on Unsplash

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.

Published via Towards AI

Feedback ↓