xuebinqin / U-2-Net

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."
Apache License 2.0
8.49k stars 1.46k forks source link

Segmentation Badly #198

Open Sparknzz opened 3 years ago

Sparknzz commented 3 years ago

Hi I trained u2net on refined supervisely dataset(including personal goods) and some of matting dataset images. Whole dataset has 60k images. After 20 epochs, I predict few of my images which should be easy to distinguish bg and fg, however it looks very bad. Personally I thought it was receptive field problem. I would now try to use dilation conv to increase it. Can anyone give me more advices on dealing with it? Thanks 00549 00095

xuebinqin commented 3 years ago

How long is the model trained ? According to the results. I think the problem is more training time is needed. Because the densely supervised mechanism converges slowly. So there are several suggestions.

(1) resize the supervisely dataset to 320x320 or 512x512 offline, because some of these images have very high resolution. If you load them and resize them online, each epoch of training time is probably slow and which further slow down the training speed.

(2) Train more epoches, e.g. 3 or 5 days.

(3) You can plot the -log(loss) to see if the training loss is flat and converged. Besides, you can show the probability maps to check the convergence based on the prediction confidence. If most of the predictions are blurring, that means the model is not well-trained and more epochs are needed.

(4) We released our model trained on supervisedly dataset. You can download it and give it a try. If that doesn’t work, then you can try other options, e.g. deeper network, more dilation, rich receptive fields, etc.

On 30 Apr 2021, at 8:14 AM, nypzxy @.***> wrote:

Hi I trained u2net on supervisely dataset for experiments. After 20 epochs, I predict few of my images which should be easy to distinguish bg and fg, however it looks very bad. Personally I thought it was receptive field problem. I would now try to use dilation conv to increase it. Can anyone give me more advices on dealing with it? Thanks

https://user-images.githubusercontent.com/22143473/116647436-1dd70800-a9ad-11eb-8539-e8abe577716e.jpg https://user-images.githubusercontent.com/22143473/116647437-1dd70800-a9ad-11eb-95d6-9a9b8d203df3.jpg — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/198, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORNP3FRZNCW7A3PGE33TLIVARANCNFSM433I6LNQ.

Sparknzz commented 3 years ago

Thanks for these useful tips. very appreciated.

1> online training for 1 day. I tested on your model as well, the results seems worse. By the way, I trained on the u2net lite with mae loss only because when I roughly relabeled supervisely dataset (blur the masks to avoid bad label). So maybe 1day training time should be fine. 2> will keep training. 3> I didn't save training logs, but the loss keep reducing. will explore prediction confidence then.

FYI, 00549 14446141319202910603

xuebinqin commented 3 years ago

Sounds good. One more suggestion about the dataset. Although supervisely human dataset is a relatively large one, its diversity is still limited. So you can try to add more human image samples from MS COCO (it is low accuracy labeling, which may degrade the spatial accuracy.) to improve the robustness.

On Fri, Apr 30, 2021 at 11:24 AM nypzxy @.***> wrote:

Thanks for these useful tips. very appreciated.

1> online training for 1 day. I tested on your model as well, the results seems worse. By the way, I trained on the u2net lite with mae loss only because when I roughly relabeled supervisely dataset (blur the masks to avoid bad label). So maybe 1day training time should be fine. 2> will keep training. 3> I didn't save training logs, but the loss keep reducing. will explore prediction confidence then.

FYI, [image: 00549] https://user-images.githubusercontent.com/22143473/116660786-1839ec00-a9c6-11eb-8741-fab38ecc4b27.jpg [image: 14446141319202910603] https://user-images.githubusercontent.com/22143473/116660985-57683d00-a9c6-11eb-9b50-506a3b670274.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xuebinqin/U-2-Net/issues/198#issuecomment-829898520, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSGORID5NAFHT5PEMUHZITTLJLKZANCNFSM433I6LNQ .

-- Xuebin Qin PhD Department of Computing Science University of Alberta, Edmonton, AB, Canada Homepage:https://webdocs.cs.ualberta.ca/~xuebin/