Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.37 KB

File metadata and controls

57 lines (47 loc) · 1.37 KB

RF-DETR: SOTA Real-Time Object Detection Model

How to Run

  1. set up a virtual environment.

    git clone https://github.com/lyuwenyu/RT-DETR.git
    cd RT-DETR
    conda create -n rtdetr -y python=3.11
    conda activate rtdetr
    pip install torch torchvision --index-url https://download.pytorch.org/whl/cu129
    pip install opencv-python
    pip install onnx
    pip install onnxscript
    pip install onnxsim
    pip install scikit-image
    pip install PyYAML
    pip install tensorboard
    pip install pycocotools
    pip install faster_coco_eval
    
  2. download pretrained checkpoints.

    cd rtdetrv2_pytorch
    mkdir -p pretrained
    wget https://github.com/lyuwenyu/storage/releases/download/v0.2/rtdetrv2_r18vd_120e_coco_rerun_48.1.pth -P pretrained
    cd ..
    
  3. check pytorch model inference

    cd ..
    python infer.py
    

How to Run (TensorRT)

  1. generate onnx file

    python onnx_export_new_ln.py
    
  2. generate tensorrt model

    python onnx2trt.py