Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: jiaweipan997
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 5.31 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed 11 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

BiDNet

This repo is the official implementation of "BiDNet: A Real-Time Semantic Segmentation Network with Anti-Feature Interference and Detail Recovery for Industrial Defects". This repo contains the supported code, configuration files, and datasets to reproduce the semantic segmentation results of BiDNet. The code is mainly based on MMSegmentaion V1.2.2. All experiments were performed on a single NVIDIA GTX 3090Ti GPU in CUDA 11.7, Python 3.8, and PyTorch 1.13.1.

Code Snippet

The code snippet is here.

Citation

If you find our repo useful for your research, please consider citing our paper: @ARTICLE{BiDNet, author={Pan, Jiawei and Zeng, Deyu and Wu, Zongze and Xie, Shengli}, journal={IEEE Transactions on Instrumentation and Measurement}, title={BiDNet: A Real-Time Semantic Segmentation Network with Anti-Feature Interference and Detail Recovery for Industrial Defects}, year={2025}, volume={74}, number={}, pages={1-16}, doi={10.1109/TIM.2025.3548182}}

Installation

Step 1. Create a conda environment and activate it. conda create --name BiDNet python=3.8 -y conda activate BiDNet Step 2. Install PyTorch following official instructions, e.g. conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia -y Step 3. Install MMCV using MIM. pip install -U openmim mim install mmengine mim install mmcv==2.0.0rc4 Step 4. Install BiDNet. git clone -b main https://github.com/jiaweipan997/BiDNet.git cd BiDNet pip install -v -e . pip install ftfy pip install regex

Verify the installation

Step 1. We need to download config and checkpoint files. When it is done, you will find two files pspnetr50-d84xb2-40kcityscapes-512x1024.py and pspnetr50-d8512x102440kcityscapes20200605003338-2966598c.pth in your current folder. ``` mim download mmsegmentation --config pspnetr50-d84xb2-40kcityscapes-512x1024 --dest . Step 2. Verify the inference demo. You will see a new image result.jpg on your current folder, where segmentation masks are covered on all objects. python demo/imagedemo.py demo/demo.png configs/pspnet/pspnetr50-d84xb2-40kcityscapes-512x1024.py pspnetr50-d8512x102440kcityscapes20200605003338-2966598c.pth --device cuda:0 --out-file result.jpg ```

Dataset prepare

The preprocessed dataset can be downloaded from this link with the code s4hn. Please create a new data folder and put the downloaded dataset in it and unzip it. The structure is as follows: BiDNet ├── mmseg ├── tools ├── configs ├── data │ ├── MSD │ │ ├── imgs │ │ │ ├── train │ │ │ ├── val │ │ │ ├── test │ │ ├── labels │ │ │ ├── train │ │ │ ├── val │ │ │ ├── test . . .

Training

```

MSD dataset:

bash tools/disttrain.sh configs/BiDNet/bidnetmscan-t1xb8-adamw-80kmsd-512x512.py 1

MTD dataset:

bash tools/disttrain.sh configs/BiDNet/bidnetmscan-t1xb4-adamw-40kmtd-512x512.py 1

GSD dataset:

bash tools/disttrain.sh configs/BiDNet/bidnetmscan-t1xb16-adamw-160kgsd-512x512.py 1 ```

Evaluation

```

MSD dataset:

python tools/test.py configs/BiDNet/bidnetmscan-t1xb8-adamw-80kmsd-512x512.py workdirs/bidnetmscan-t1xb8-adamw-80kmsd-512x512/iter80000.pth

MTD dataset:

python tools/test.py configs/BiDNet/bidnetmscan-t1xb4-adamw-40kmtd-512x512.py workdirs/bidnetmscan-t1xb4-adamw-40kmtd-512x512/iter40000.pth

GSD dataset:

python tools/test.py configs/BiDNet/bidnetmscan-t1xb16-adamw-160kgsd-512x512.py workdirs/bidnetmscan-t1xb16-adamw-160kgsd-512x512/iter160000.pth ```

Params and FLOPs

python tools/analysis_tools/get_flops.py configs/BiDNet/bidnet_mscan-t_1xb8-adamw-80k_msd-512x512.py --shape 512

FPS

python tools/analysis_tools/benchmark.py configs/BiDNet/bidnet_mscan-t_1xb8-adamw-80k_msd-512x512.py work_dirs/bidnet_mscan-t_1xb8-adamw-80k_msd-512x512/iter_80000.pth

Owner

  • Login: jiaweipan997
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - name: "MMSegmentation Contributors"
title: "OpenMMLab Semantic Segmentation Toolbox and Benchmark"
date-released: 2020-07-10
url: "https://github.com/open-mmlab/mmsegmentation"
license: Apache-2.0

GitHub Events

Total
  • Watch event: 2
  • Push event: 36
Last Year
  • Watch event: 2
  • Push event: 36