Giter VIP home page Giter VIP logo

Comments (7)

yzd-v avatar yzd-v commented on June 16, 2024

For mmdet < 3.0, refer this for optimizer

from fgd.

yingwenmingzi123 avatar yingwenmingzi123 commented on June 16, 2024

I revised the optimizer,but it still has error.
File "/home/yxy/anaconda3/envs/yolox/lib/python3.7/site-packages/mmdet/models/backbones/csp_darknet.py
patch_top_left = x[..., ::2,::2]
TypeError: string indices must be integers
But I use the code to distill retinanet,there is no error.

from fgd.

yzd-v avatar yzd-v commented on June 16, 2024

Do you try yolox without distillation ? The error may in mmdet codes instead of distillation.

from fgd.

yingwenmingzi123 avatar yingwenmingzi123 commented on June 16, 2024

I try yolox without distillation ,there is no error. I used the version mmdet==2.19.0 and mmcv-full==1.5.0 , is it maybe related to mmdet and mmcv version mismatch? Thank you for your reply.

from fgd.

yzd-v avatar yzd-v commented on June 16, 2024

Fine, I do not know how to fix it either. You can run yolox, that means the mmdet and mmcv-full is matched.

from fgd.

yingwenmingzi123 avatar yingwenmingzi123 commented on June 16, 2024
        scale_y = 1.0
        scale_x = 1.0
        gt = kwargs['gt_bboxes']
        if self.yolox:
            scale_y = self.student._input_size[0] / self.student._default_input_size[0]
            scale_x = self.student._input_size[1] / self.student._default_input_size[1]
            student_loss, img, gt = self.student.forward_train(img, img_metas, **kwargs)
        else:
            student_loss = self.student.forward_train(img, img_metas, **kwargs)
        
        with torch.no_grad():
            fea_t = self.teacher.extract_feat(img)

您好,在in the mmdet/distillation/distillers/detection_distiller.py 这个文件里
当self.yolox is true, fea_t = self.teacher.extract_feat(img) 里面的img传入的实际并不是图像,而是loss_bbox.
然后,您能看下,是不是这个问题导致输入的类型错误。但是当我改成student_loss = self.student.forward_train(img, img_metas, **kwargs)的时候,又会报下面的错误。但是我看代码里面有特征图对齐的代码,不知道这是怎么搞的了
assert preds_S.shapel-2:] == preds_T.shapel-2:],'the output dim of teacher and student differ AssertionError: the output dim of teacher and student differ

from fgd.

yzd-v avatar yzd-v commented on June 16, 2024

返回的应该就是img,你看看你有没有对yolox这个detetcor做修改,这里执行forward_train后会返回loss, img, bbox
image

from fgd.

Related Issues (20)

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.