Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jacky-hjqq/BioDet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BioDet: Boosting Industrial Object Detection with Image Preprocessing Strategies

Pipeline

⚙️ Requirements

  • Ubuntu 20.04
  • Python 3.9
  • Pytorch 2.3.0
  • CUDA 11.8
  • 1 * NVIDIA RTX 4090

🔨 Installation

  • Create Environment

conda env create -f environment.yaml
conda activate BioDet

🗂️ Download dataset and models

Download basic models in SAM6D

cd Instance_Segmentation_Model
python download_sam.py
python download_fastsam.py
python download_dinov2.py

Download additional models in BioDet

Download

Download

Download

The organization of the checkpoints should be as follows:

SAM-6D
└── Instance_Segmentation_Model
   ├── checkpoints
        ├── dinov2
        ├── FastSAM
        ├── gdino
        ├── HVI
        ├── mobilesam
        └── segment-anything

Download the datasets

  • You can download the Datasets (IPD/XYZ-IBD) from BOP Benchmark.

  • We provide the rendered templates of IPD for trying, you can download from this link

  • The organization of the datasets should be as follows:

SAM-6D
└── Data
    ├── BOP
        ├── ipd
            ├── test
            ├── models
            ├── test_targets_bop24.json
        ├── xyzibd
            ├── test
            ├── models
            ├── test_targets_bop24.json
    └── BOP-Templates
        ├── ipd
        ├── xyzibd

# Feel free to change the data path under "SAM-6D/Instance_Segmentation_Model/preprocess/config.yaml"

🎯 Inference and evaluation

Evaluate 2D Detection performance

# inference IPD with fastsam
python SAM-6D/Instance_Segmentation_Model/inference_ipd.py \
  --dataset_name ipd \
  --cfg SAM-6D/Instance_Segmentation_Model/preprocess/config.yaml \
  --sam_type ISM_fastsam

# inference IPD with sam
python SAM-6D/Instance_Segmentation_Model/inference_ipd.py \
  --dataset_name ipd \
  --cfg SAM-6D/Instance_Segmentation_Model/preprocess/config.yaml \
  --sam_type ISM_sam

# inference XYZ-IBD with fastsam
python SAM-6D/Instance_Segmentation_Model/inference_xyzibd.py \
  --dataset_name ipd \
  --cfg SAM-6D/Instance_Segmentation_Model/preprocess/config.yaml \
  --sam_type ISM_fastsam

# inference XYZ-IBD with sam
python SAM-6D/Instance_Segmentation_Model/inference_xyzibd.py \
  --dataset_name ipd \
  --cfg SAM-6D/Instance_Segmentation_Model/preprocess/config.yaml \
  --sam_type ISM_sam

Convert the results to BOP format

python convert_bop_fromat.py --dataset_name ipd --segmentation_model fastsam

python convert_bop_fromat.py --dataset_name ipd --segmentation_model sam

python convert_bop_fromat.py --dataset_name xyzibd --segmentation_model fastsam

python convert_bop_fromat.py --dataset_name xyzibd --segmentation_model sam

Acknowledgement

The code is adapted from SAM6D.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •