BiSeNet icon indicating copy to clipboard operation
BiSeNet copied to clipboard

Questions about training with customdatasets

Open huangwan-jiayi opened this issue 3 years ago • 17 comments

I made the following changes: image the errror: image image

image I hope someone can help me take a look, how should I modify。Thanks!!!!!!!!!

huangwan-jiayi avatar Dec 24 '21 13:12 huangwan-jiayi

Hi,

Please make sure your input image sizes are divisible by 32.

CoinCheung avatar Dec 25 '21 02:12 CoinCheung

Hi,

Please make sure your input image sizes are divisible by 32. he worked! thank you very much!! If I want to train a custom crop size, where should I modify the code so that the crop ratio is not restricted by 32.thank you!!

huangwan-jiayi avatar Dec 25 '21 04:12 huangwan-jiayi

Excuse me, but I encountered a new problem. When I started training and reported the following error, how can I solve it? Thank you. image

huangwan-jiayi avatar Dec 25 '21 05:12 huangwan-jiayi

You can change crop size in configuration file: https://github.com/CoinCheung/BiSeNet/blob/f9231b7c971413e6ebdfcd961fbea53417b18851/configs/bisenetv1_city.py#L15

CoinCheung avatar Dec 25 '21 07:12 CoinCheung

What is your dataset like? How many categories are in your dataset? What is the range of label values?

CoinCheung avatar Dec 25 '21 07:12 CoinCheung

What is your dataset like? How many categories are in your dataset? What is the range of label values?

it has 3 categories ,sorry,what about the last question mean?

huangwan-jiayi avatar Dec 25 '21 08:12 huangwan-jiayi

Please check here: https://github.com/CoinCheung/BiSeNet/blob/f9231b7c971413e6ebdfcd961fbea53417b18851/lib/cityscapes_cv2.py#L67 If your label values are within (0,1,2), you need to bypass these lines about label value mapping.

CoinCheung avatar Dec 27 '21 06:12 CoinCheung

Please check here:

https://github.com/CoinCheung/BiSeNet/blob/f9231b7c971413e6ebdfcd961fbea53417b18851/lib/cityscapes_cv2.py#L67

If your label values are within (0,1,2), you need to bypass these lines about label value mapping.

Do you mean to modify this file? image I made the following changes: image My label map: image What changes should I make to solve this problem?

huangwan-jiayi avatar Dec 27 '21 07:12 huangwan-jiayi

Have you checked every label image to make sure every label image is within [0-2] ?

CoinCheung avatar Dec 28 '21 02:12 CoinCheung

image There are only two categories of label images and three categories of label images in the data set

huangwan-jiayi avatar Dec 28 '21 02:12 huangwan-jiayi

I mean, have you checked one by one, and make sure each picuture's value are within [0-2]? Better try with cv2.imread(pth, 0): https://github.com/CoinCheung/BiSeNet/blob/f9231b7c971413e6ebdfcd961fbea53417b18851/lib/base_dataset.py#L53

CoinCheung avatar Dec 28 '21 06:12 CoinCheung

you mean this? The output of each label map in my data set is like the following figure。

image image I still haven't solved this problem。 image

huangwan-jiayi avatar Dec 28 '21 08:12 huangwan-jiayi

These are pytorch native operators, which is unlikely to have memory problem. What is the batch size did you use to train your model?

CoinCheung avatar Dec 28 '21 10:12 CoinCheung

batchsize is 8 image

huangwan-jiayi avatar Dec 28 '21 11:12 huangwan-jiayi

batchsize is 8 image

excuse me ! have you ever solved this problem?

Thatboy7 avatar Jun 20 '22 11:06 Thatboy7

batchsize is 8 image

i meet the same question

Thatboy7 avatar Jun 20 '22 11:06 Thatboy7

@Thatboy7 you should guarantee your labels have one channel.

miscedence12 avatar Sep 13 '22 02:09 miscedence12