Skip to content

Dilated Involutional Pyramid Network (DInPNet): A Novel Model for Printed Circuit Board (PCB) Components Classification

License

Notifications You must be signed in to change notification settings

CandleLabAI/DInPNet-PCB-Component-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dilated Involutional Pyramid Network (DInPNet): A Novel Model for Printed Circuit Board (PCB) Components Classification

Overview:

This repository contains the source code of our paper, DInPNet (published in ISQED-23).

We introduce a novel light-weight PCB component classification network, named DInPNet. We introduce the dilated involutional pyramid (DInP) block, which consists of an involution for transforming the input feature map into a low-dimensional space for reduced computational cost, followed by a pairwise pyramidal fusion of dilated involutions that resample back the feature map. This enables learning representations for a large effective receptive field while bringing down the number of parameters considerably.


Project Organization

β”œβ”€β”€ LICENSE                         <- The LICENSE for developers using this project.
β”œβ”€β”€ README.md                       <- The top-level README for developers using this project.
β”œβ”€β”€ 3A5_DInPNet.pdf                 <- Presentation PDF file of the project.
β”œβ”€β”€ requirements.txt                <- The requirements file for reproducing the analysis environment, e.g. generated with `pip freeze > requirements.txt`.
|── reports                         <- The directory containing metadata used for repo.
β”œβ”€β”€ checkpoints                     <- Directory where best models will be saved.
β”œβ”€β”€ src                             <- Source code for use in this project.
β”‚Β Β  β”œβ”€β”€ dataloader.py               <- Source code for generating data loader.
|   β”œβ”€β”€ config.py                   <- basic configurations for classification training of DInPNet model.
β”‚Β Β  β”œβ”€β”€ network.py                  <- Source code for the DInPNet network.
β”‚Β Β  β”œβ”€β”€ utils.py                    <- Source code for utilities and helper functions.
β”‚Β Β  β”œβ”€β”€ train.py                    <- Source code for training and validation of DInPNet
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────


Network Architecture

Figure 1. (A) DInPNet (B) Dilated Involutional Pyramid Block


Get Started

Dependencies:

pip install -r requirements.txt

(Optional) Conda Environment Configuration

First, create a conda environment

conda create -n va python=3.8
conda activate va
conda install pip
pip install -r requirements.txt

Dataset

We have used FICS-PCB dataset which can be downloaded from here. Components data needs to placed under data/ directory.

Data Structure in data/ directory after completing above steps

β”œβ”€β”€ Train
β”‚   β”œβ”€β”€β”€capacitors
β”‚Β Β  β”‚   └── image_0.png
β”‚Β Β  β”‚   └── image_1.png
β”‚Β Β  β”‚   └── ...
β”‚   β”œβ”€β”€β”€diodes
β”‚Β Β  β”‚   └── image_0.png
β”‚Β Β  β”‚   └── image_1.png
β”‚Β Β  β”‚   └── ...
|   └── ...
β”œβ”€β”€ Test
β”‚   β”œβ”€β”€β”€capacitors
β”‚Β Β  β”‚   └── image_0.png
β”‚Β Β  β”‚   └── image_1.png
β”‚Β Β  β”‚   └── ...
β”‚   β”œβ”€β”€β”€diodes
β”‚Β Β  β”‚   └── image_0.png
β”‚Β Β  β”‚   └── image_1.png
β”‚Β Β  β”‚   └── ...
|   └── ...
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────

Train model

Change the hyperparameters and configuration parameters according to need in src/config.py.

To train DInPNet, Run following command from /src directory.

python train.py

Above command will train model for 100 epochs with given configuration.

The trained checkpoint for model training will be saved in /weights/best.pt

Citation

@inproceedings {mantravadi2023Dilated,
    title            = {{Dilated Involutional Pyramid Network (DInPNet): A Novel Model for Printed Circuit Board (PCB) Components Classification}},
	year             = "2023",
	author           = "Ananya Mantravadi and Dhruv Makwana and R Sai Chandra Teja and Sparsh Mittal and Rekha Singhal",
	booktitle        = {{24th International Symposium on Quality Electronic Design (ISQED)}},
	address          = "California, USA",
}

License


CC BY-NC-ND 4.0

About

Dilated Involutional Pyramid Network (DInPNet): A Novel Model for Printed Circuit Board (PCB) Components Classification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages