GithubHelp home page GithubHelp logo

mousecpn / dg-yolo Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 5.0 173 KB

[ICIP2020] TOWARDS DOMAIN GENERALIZATION IN UNDERWATER OBJECT DETECTION

Python 86.24% Shell 13.76%
domain-generalization underwater-object-detection

dg-yolo's People

Contributors

mousecpn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dg-yolo's Issues

图像

您好,我也没做过目标检测的任务。目前我有个downstream task用到了。
在使用阶段,可以输出map值, 但是没有绘制了检测框的图像输出,我想问问您关于这一块儿是需要怎么处理,我在augmentations里面看见了imgshow_output 方法,但是会发生错误。

domain_label代码不太理解

image
image
请问,为什么只有7个type,domain_label却要初始化8个0,我的猜想是第0维度是batch_size,
但是我不理解这个mask处理,为什么要把batch_szie这一维==1的挑出来,就是mask这段不太理解在做什么。

What's the size setting of WQT output?

If we adopt WQT to create val_8 (do not appear in training set), :
1.how to keep annotation correct when we create val_8 (if we set WQT output size=512,it's a square maybe original picture is (512,1024) it's a rectangle,we can not get the correct annotation)
2.Is there any requirement in target domain picture's size? (e.g. if we use 512512 DG-YOLO may get worse than 416416 ?)

WQT

How can I use WQT on my datasets?

Could you share WQT transform code?

My card cannot support your code, so I want to use yolov7 to run your dataset,but it's weird that YOLOV7 reach a very low mAP, just about mAP50 = 30,even can not reach your yolov3 baseline mAP=56.
So I want to change dataset to URPC2022,and I also want to use your WQT transform to make different style of water quality. Thank you very much!
image

about class

When I used the weights you gave for the test, I deleted the category of seaweed, and it should be four categories at this time. But the detected categories always have an AP of 0.0.what should I do?
Also, I want to ask, if when testing for the classification order is the same as in marine_coco_names

This is the test result without changing the marine_coco_names classification order

This is an image

This is the test result that changing the marine_coco_names classification order,So I'm sure it's not because I changed the order at test.

This is an image
This is an image

Unable to replicate the results in DG-YOLO paper

I am not sure why I am unable to replicate the results in DG-YOLO paper. I have used the given checkpoint and used the test.py code with the following command.

python test.py --weights_path weights/DGyolov3.pth --batch_size 1 --augment True
I got the following accuracies:
Average Precisions:

  • Class '0' (echinus) - AP: 0.5152980911280326
  • Class '1' (starfish) - AP: 0.20208827000334217
  • Class '2' (holothurian) - AP: 0.23568195829279015
  • Class '3' (scallop) - AP: 0.14365203861799805
  • Class '4' (waterweeds) - AP: 0.001995890292044762
    mAP: 0.21974324966684153

From the paper I see that mAP (in Table 3 for DG-YOLO) is 33.7. The only change I did is to impose the single batch-size. @mousecpn : Can you please help me if I am going terribly wrong some where. Why the direct pretrained model with a different batch_size should give significantly different results?

The AP of holothurian is too low

image
I download your dataset,then change nothing in the code.But when it come to 82 epoch, the AP of holothurian is still have something wrong

What does it mean of ori+type1?

in Table 1, the WQT is used to create type1 data. Does ori+type1 mean that you put ori (4000 images) and also type1 (4000 images) total 8000 images of fully superviesed learning? Does it cause overfitting?

Error Running train.py RuntimeError: No CUDA GPUs are available

I'm facing the following issue while running the code for training.

Namespace(batch_size=8, checkpoint_interval=2, compute_map=False, data_config='config/coco.data', epochs=300, evaluation_interval=2, gradient_accumulations=2, img_size=416, model_def='config/yolov3.cfg', multiscale_training=True, n_cpu=4, pretrained_weights='/content/darknet53.conv.74')
/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:566: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
  cpuset_checked))
/content/DG-YOLO/DG_model.py:200: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_x = self.mse_loss(x[obj_mask]*dummy_w, tx[obj_mask])
/content/DG-YOLO/DG_model.py:201: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_y = self.mse_loss(y[obj_mask]*dummy_w, ty[obj_mask])
/content/DG-YOLO/DG_model.py:202: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_w = self.mse_loss(w[obj_mask]*dummy_w, tw[obj_mask])
/content/DG-YOLO/DG_model.py:203: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_h = self.mse_loss(h[obj_mask]*dummy_w, th[obj_mask])
/content/DG-YOLO/DG_model.py:204: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_conf_obj = self.bce_loss(pred_conf[obj_mask], tconf[obj_mask])
/content/DG-YOLO/DG_model.py:205: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_conf_noobj = self.bce_loss(pred_conf[noobj_mask], tconf[noobj_mask])
/content/DG-YOLO/DG_model.py:207: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  loss_cls = self.bce_loss(pred_cls[obj_mask], tcls[obj_mask])
/content/DG-YOLO/DG_model.py:210: UserWarning: indexing with dtype torch.uint8 is now deprecated, please use a dtype torch.bool instead. (Triggered internally at  ../aten/src/ATen/native/IndexingUtils.h:27.)
  pen = penalty(prediction[..., 4][obj_mask],tconf[obj_mask])
Traceback (most recent call last):
  File "/content/DG-YOLO/DG_train.py", line 125, in <module>
    loss, outputs,features,pen = model(imgs, targets, da=True, IRM=True, dummy_w=scale)
  File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/DG-YOLO/DG_model.py", line 274, in forward
    x, layer_loss,layer_pen = module[0](x, targets, img_dim,IRM=IRM,dummy_w = dummy_w)
  File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/content/DG-YOLO/DG_model.py", line 210, in forward
    pen = penalty(prediction[..., 4][obj_mask],tconf[obj_mask])
  File "/content/DG-YOLO/DG_model.py", line 17, in penalty
    scale = torch.tensor(1.).cuda().requires_grad_()
  File "/usr/local/lib/python3.7/dist-packages/torch/cuda/__init__.py", line 217, in _lazy_init
    torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available

about URPC2019 data problem

Hi i notice that the label of URPC2019 (which you shared on your repo) is very small.
It is hard for me to change it to my dataset.
Why those nums so small?
Is these divide by weight/height?

for example:
4 0.058854166666666666 0.21296296296296297 0.1171875 0.13425925925925927
2 0.190625 0.46296296296296297 0.09479166666666666 0.13425925925925927

i hope you could help me this, or we can communicate on wechat. :)

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.