mousecpn / dg-yolo Goto Github PK
View Code? Open in Web Editor NEW[ICIP2020] TOWARDS DOMAIN GENERALIZATION IN UNDERWATER OBJECT DETECTION
[ICIP2020] TOWARDS DOMAIN GENERALIZATION IN UNDERWATER OBJECT DETECTION
您好,我也没做过目标检测的任务。目前我有个downstream task用到了。
在使用阶段,可以输出map值, 但是没有绘制了检测框的图像输出,我想问问您关于这一块儿是需要怎么处理,我在augmentations里面看见了imgshow_output 方法,但是会发生错误。
File "D:\pycharm_workspace\DG-YOLO-master\test.py", line 107, in
for i, c in enumerate(ap_class):
TypeError: 'int' object is not iterable
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 ?)
How can I use WQT on my datasets?
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!
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 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.
Thx for your work, could you share your trained weights?
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:
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?
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?
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
Compute mAP...
Detecting objects: 0%| | 0/118 [00:00<?, ?it/s]
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. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.