Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pickle file in the read me file for custom dataset #4

Open
freaad opened this issue Jan 3, 2020 · 8 comments
Open

pickle file in the read me file for custom dataset #4

freaad opened this issue Jan 3, 2020 · 8 comments

Comments

@freaad
Copy link

freaad commented Jan 3, 2020

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

@HYOJINPARK
Copy link
Collaborator

HYOJINPARK commented Jan 6, 2020

In my case :

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

@freaad
Copy link
Author

freaad commented Jan 6, 2020

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?

@HYOJINPARK
Copy link
Collaborator

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

@freaad
Copy link
Author

freaad commented Jan 9, 2020

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.

@meanmee
Copy link

meanmee commented Mar 31, 2020

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

@HYOJINPARK
Copy link
Collaborator

@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

@aliwaqas333
Copy link

Which section of code is responsible for generating pickle file?

@aguthrie19
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants