GithubHelp home page GithubHelp logo

endeavour10020 / circuitformer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hustvl/circuitformer

0.0 0.0 0.0 150 KB

[NeurIPS 2023] CircuitFormer: Circuit as Set of Points

Python 100.00%

circuitformer's Introduction

CircuitFormer

Circuit as Set of Points

Jialv Zou1 , Xinggang Wang1 ๐Ÿ“ง , Jiahao Guo1 , Wenyu Liu1 , Qian Zhang2 , Chang Huang2

1 School of EIC, HUST, 2 Horizon Robotics

(๐Ÿ“ง) corresponding author.

NeurIPS 2023

ArXiv Preprint

Abstract

As the size of circuit designs continues to grow rapidly, artificial intelligence technologies are being extensively used in Electronic Design Automation (EDA) to assist with circuit design. Placement and routing are the most time-consuming parts of the physical design process, and how to quickly evaluate the placement has become a hot research topic. Prior works either transformed circuit designs into images using hand-crafted methods and then used Convolutional Neural Networks (CNN) to extract features, which are limited by the quality of the hand-crafted methods and could not achieve end-to-end training, or treated the circuit design as a graph structure and used Graph Neural Networks (GNN) to extract features, which require time-consuming preprocessing. In our work, we propose a novel perspective for circuit design by treating circuit components as point clouds and using Transformer-based point cloud perception methods to extract features from the circuit. This approach enables direct feature extraction from raw data without any preprocessing, allows for end-to-end training, and results in high performance. Experimental results show that our method achieves state-of-the-art performance in congestion prediction tasks on both the CircuitNet and ISPD2015 datasets, as well as in design rule check (DRC) violation prediction tasks on the CircuitNet dataset. Our method establishes a bridge between the relatively mature point cloud perception methods and the fast-developing EDA algorithms, enabling us to leverage more collective intelligence to solve this task.

Installation

a. Create a conda virtual environment and activate it.

conda create -n circuitformer python=3.9 -y
conda activate circuitformer

b. Install PyTorch and torchvision following the official instructions.

pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 -f https://download.pytorch.org/whl/torch_stable.html

c. Install torch_scatter and spconv.

  • You could install torch_scatter with pip, see the official documents of torch_scatter.
  • You could install latest spconv v2.x with pip, see the official documents of spconv.

d. Install other requirements.

pip install -r requirement.txt

e. Prepare pretrained models.

mkdir ckpts

cd ckpts 
wget https://download.pytorch.org/models/resnet18-f37072fd.pth

Prepare Dataset

Please download CircuitNet-N28 dataset follow the guide of CircuitNet

Folder structure

circuitformer
โ”œโ”€โ”€ dataset/
โ”‚   โ”œโ”€โ”€ CircuitNet/
โ”‚   โ”‚   โ”œโ”€โ”€ graph_features/
|   |   |   โ”œโ”€โ”€ instance_placement/
โ”‚   โ”‚   โ”œโ”€โ”€ train_congestion/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ congestion/
โ”‚   โ”‚   โ”‚   |   โ”œโ”€โ”€ feature/
โ”‚   โ”‚   โ”‚   |   โ”œโ”€โ”€ label/
โ”‚   โ”‚   โ”œโ”€โ”€ train_DRC/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DRC/
โ”‚   โ”‚   โ”‚   |   โ”œโ”€โ”€ feature/
โ”‚   โ”‚   โ”‚   |   โ”œโ”€โ”€ label/

Train and Test

Train circuitformer

python train.py

Please download our pretrain model Here and put it in 'ckpts/'

Test circuitformer

python test.py

Acknowledgment

The dataset is provided by CircuitNet. Our code is developed based on VoxSeT and segmentation_models.pytorch

circuitformer's People

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.