ext_portrait_segmentation icon indicating copy to clipboard operation
ext_portrait_segmentation copied to clipboard

pickle file in the read me file for custom dataset

Open freaad opened this issue 5 years ago • 8 comments

Hello. Thank you for sharing your code and paper. I am checking your code and there are some confuse what I face. First in the readme file, if I want to use the custom dataset I need to make new pickle file. Could you explain which part of the code should I change? In the train and test config, there is pickle file we need to change. Is it automatically change or should we make this manually. Also in the config there is dataset address we need to change "data_dir": "../../Link512DATA/" is it assume that the structure of folder is below? Link512DATA/ └── Nukki └── baidu_V1 ├── input ├── target ├── train.txt └── val.txt └── baidu_V2 ├── input ├── target ├── train.txt └── val.txt └── Portrait

freaad avatar Jan 03 '20 00:01 freaad

In my case :

Link512DATA
└── Nukki
    └── baidu_V1
         ├── input
         ├── target
         ├── train.txt
         └── val.txt
   └── baidu_V2
         ├── input
         ├── target
         ├── train.txt
         └── val.txt
└── Portrait

HYOJINPARK avatar Jan 06 '20 08:01 HYOJINPARK

I finally figure it out how to make new pickle file. However I still have question. After that, the mask has 1 channel but the result has 2 channel because we have 2 class. The loss face the error because of different channel size. Do you have any idea?

freaad avatar Jan 06 '20 18:01 freaad

If you use Lovasz loss, the final channel is 1. However, if you use cross-entropy loss, the channel size is 2

HYOJINPARK avatar Jan 09 '20 01:01 HYOJINPARK

Thank you for answering the question. So you mean, if I want to use the Lovasz loss, I should final channel as 1 right? I have set final channel as 1 and the code works well. However I am not so sure that I have done correctly. Also, the paper and code said you try to train edge also and it has better result. Did you try to do this with small object? I am currently trying your code to other dataset. My final purpose is small object segmentation.

freaad avatar Jan 09 '20 02:01 freaad

@freaad first congratulations, Could you show your codes of how to make pickle files?

meanmee avatar Mar 31 '20 07:03 meanmee

@freaad Oh..I am really sorry to late answer. yes change channel size. I guess generally it is possible. but the some small issue is making edge properly. In my code I used morphology operation to generate edge area. I don't know how small about your target objects. I guess proper GT edge region is important

@meanmee If you mean to generate pickle files for dataset, it is included my released code

HYOJINPARK avatar Apr 03 '20 08:04 HYOJINPARK

Which section of code is responsible for generating pickle file?

aliwaqas333 avatar Jun 01 '20 08:06 aliwaqas333

@aliwaqas333 a quick git grep pickle or searching the github repo for "pickle" reveals the code responsible https://github.com/clovaai/ext_portrait_segmentation/search?q=pickle

aguthrie19 avatar Nov 17 '20 22:11 aguthrie19