microsoft / SoftTeacher

Semi-Supervised Learning, Object Detection, ICCV2021
MIT License
892 stars 123 forks source link

applying Yolo in place of Faster RCNN #221

Open tahirashehzadi opened 2 years ago

tahirashehzadi commented 2 years ago

Hi, I want to apply yolo detector. I used single stage functions in softTeacher. I did modifications for sible stage detector in softTeacher file.
After modication do i need to reinstall mmcv again?

ericpresas commented 2 years ago

I'm doing something similar with DETR. How do you compute pseudo bbox for regression loss? As far as I know, a score should be computed by applyning the vaiance between bbox outputs from several auged images in teacher. For now, I'm skipping this step by directly filtering the proposals by regression score threshold. I think you don't need to reinstall mmcv again.

tahirashehzadi commented 2 years ago

I have to embed the ssod in mmcv. whenever i made changes in softTeacher file i have to add it in mmcv

ericpresas commented 2 years ago

if you execute train.py from ssod you don't need to embed it in mmcv, the decorator @DETECTORS.register_module() does it automatically. I'm curious about your results using yolo, did you run any training yet?

tahirashehzadi commented 2 years ago

Can you please elaborate what do you mean by "execute train.py from ssod"?

ericpresas commented 2 years ago

i mean the script train.py that is provided in tools directory from this repo. You don't need to embed anything to mmcv, from my experience modifying softTeacher file is enough since you are registering the module by the decorator.

tahirashehzadi commented 2 years ago

apt update

python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git' python -m pip install 'git+https://github.com/gouthamkallempudi/mmdetection.git' pip install timm pip uninstall mmdet==2.18.1 pip install mmdet==2.17.0 apt clean I am installing these and directly embed softTeacher in image file. Can you please share your enviroment file

ericpresas commented 2 years ago

Why are you doing this python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git'?

You first need to train it with your dataset and after that you can perform inference following the instructions provided in readme file. To be able to train it you just need to create a virtuelenv and type make

mary-0830 commented 2 years ago

Can I use this code base (python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git') to replace the backbone with a one-stage one? @tahirashehzadi

tahirashehzadi commented 1 year ago

Why are you doing this python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git'?

You first need to train it with your dataset and after that you can perform inference following the instructions provided in readme file. To be able to train it you just need to create a virtuelenv and type make

I'm doing something similar with DETR. How do you compute pseudo bbox for regression loss? As far as I know, a score should be computed by applyning the vaiance between bbox outputs from several auged images in teacher. For now, I'm skipping this step by directly filtering the proposals by regression score threshold. I think you don't need to reinstall mmcv again.

Have you applied deter?

tahirashehzadi commented 1 year ago

Can I use this code base (python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git') to replace the backbone with a one-stage one? @tahirashehzadi

sure

ericpresas commented 1 year ago

Why are you doing this python -m pip install 'git+https://github.com/tahirashehzadi/Semi-Supervised-Floor-Plan-Detection.git'? You first need to train it with your dataset and after that you can perform inference following the instructions provided in readme file. To be able to train it you just need to create a virtuelenv and type make

I'm doing something similar with DETR. How do you compute pseudo bbox for regression loss? As far as I know, a score should be computed by applyning the vaiance between bbox outputs from several auged images in teacher. For now, I'm skipping this step by directly filtering the proposals by regression score threshold. I think you don't need to reinstall mmcv again.

Have you applied deter?

I'm solving some bugs in my code and I can upload a first version to train it using DETR. You should check DETR config files from mmdetection if you want to apply it. Anyways I will post an answer to this issue when i have it working.

1224wxwx commented 1 year ago

Hi @ericpresas, I'm working on apply softTeacher with Deformable DETR. Thanks for your folked version, it really helps me a lot. But I don't quite understand the difference between “soft_teacher_detr_simple” and “soft_teacher_detr”. Could you please tell me why you create these two versions and what's the difference? Thank you.

ericpresas commented 1 year ago

Hi @1224wxwx, as you can see my forked version is not finished yet. As I said I'm solving some bugs and I will upload an updated version this month. The difference between this two classes is because I first tried to calculate classification and regression loss applying different filters as the paper explains but since we are using a Single Stage network it's hard to compute the variance for regression loss. That's the propose of soft_teacher_detr that I tried with no sucess. Now in soft_teacher_detr_simple I'm trying to use a single filter to compute all the losses that the Network uses avoiding this split. I hope it will work...

If you have some ideas how to implement the calculation of regression and classification loss for our case, let me know :)

1224wxwx commented 1 year ago

Hi @1224wxwx, as you can see my forked version is not finished yet. As I said I'm solving some bugs and I will upload an updated version this month. The difference between this two classes is because I first tried to calculate classification and regression loss applying different filters as the paper explains but since we are using a Single Stage network it's hard to compute the variance for regression loss. That's the propose of soft_teacher_detr that I tried with no sucess. Now in soft_teacher_detr_simple I'm trying to use a single filter to compute all the losses that the Network uses avoiding this split. I hope it will work...

If you have some ideas how to implement the calculation of regression and classification loss for our case, let me know :)

Hi @ericpresas , thanks for your replay. Deformable DETR is not quite the same with DETR. It has an "iterative" mode, so that we can use the later stage to iteratively refine bounding box from early stage. In my opinion, we can try to compute the variance for regession loss in this "iterative" mode. You can check the details in the paper and I hope it will work. If you have to use DETR, I think you can also apply the "iterative" mode in DETR.

ericpresas commented 1 year ago

Hi @1224wxwx, as you can see my forked version is not finished yet. As I said I'm solving some bugs and I will upload an updated version this month. The difference between this two classes is because I first tried to calculate classification and regression loss applying different filters as the paper explains but since we are using a Single Stage network it's hard to compute the variance for regression loss. That's the propose of soft_teacher_detr that I tried with no sucess. Now in soft_teacher_detr_simple I'm trying to use a single filter to compute all the losses that the Network uses avoiding this split. I hope it will work... If you have some ideas how to implement the calculation of regression and classification loss for our case, let me know :)

Hi @ericpresas , thanks for your replay. Deformable DETR is not quite the same with DETR. It has an "iterative" mode, so that we can use the later stage to iteratively refine bounding box from early stage. In my opinion, we can try to compute the variance for regession loss in this "iterative" mode. You can check the details in the paper and I hope it will work. If you have to use DETR, I think you can also apply the "iterative" mode in DETR.

Nice!! I think it should work. Thank you!