RTDETR v2 - Real Time Object Detection: Updates, algorithm and code reading

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ •

  • @taido4883
    @taido4883 15 днів тому

    Thank you for another super video. The way you debug code is eye-opening!
    I have watched your other video, but this one seems much better. It would be very interesting if you could make a video to guide through steps like setting up break points, running only part of the code, etc.

  • @taido4883
    @taido4883 11 днів тому

    Is there any idea on how to extract loss from the forward pass model(images, targets)?
    Sorry for having many questions! This model is so interesting!

    • @taido4883
      @taido4883 10 днів тому

      It can be extracted via loss_dict=criterion(outputs,targets) with outputs= model(images, targets). Any idea if there are different weights for different loss components?

    • @makgaiduk
      @makgaiduk  9 днів тому

      Np, I love questions. The source code for that is here: github.com/lyuwenyu/RT-DETR/blob/main/rtdetrv2_pytorch/src/solver/det_engine.py#L49
      Added it to my example notebook as well github.com/adensur/blog/blob/main/computer_vision_zero_to_hero/32_rtdetr_v2/sandbox.ipynb

  • @ucpm644
    @ucpm644 Місяць тому +2

    How to training this model on the custom dataset ? Thankyou.

    • @makgaiduk
      @makgaiduk  Місяць тому

      I'll try to go through the process and write a short instruction. But in theory:
      - Create a config, specifying the pretrained model similar to how they did it for discrete sampling: github.com/lyuwenyu/RT-DETR/blob/main/rtdetrv2_pytorch/configs/rtdetrv2/rtdetrv2_r18vd_dsp_3x_coco.yml#L10
      - Convert your dataset to format similar to CoCo (i described how to get it here: github.com/adensur/blog/blob/main/computer_vision_zero_to_hero/32_rtdetr_v2/Install.md), i.e., with the same label and directory format
      After this, you should be able to run training (described here: github.com/lyuwenyu/RT-DETR/tree/main/rtdetrv2_pytorch#usage)

  • @taido4883
    @taido4883 13 днів тому

    In your demo code, CLASSES is defined with 91 classes which include 11 NA labels. Is there a reason for this?

    • @makgaiduk
      @makgaiduk  12 днів тому

      No, just my sloppy code. The CLASSES code is copy-pasted from some of my earlier videos (DETR, probably), and didn't correspond exactly to the format used in RT DETR. There should be a correct definition for all classes with proper names, but I was too lazy to find it

    • @taido4883
      @taido4883 12 днів тому

      @@makgaiduk I found this comment in coco_detection.yml file and saw that your code matches exactly the same
      # num_classes: 91
      # remap_mscoco_category: False