aRI0U / RandLA-Net-pytorch

PyTorch implementation of RandLA-Net
338 stars 50 forks source link

class_weights #41

Open lifangyan16 opened 1 year ago

lifangyan16 commented 1 year ago

class_weights = [1938651, 1242339, 608870, 1699694, 2794560, 195000, 115990, 549838, 531470, 292971, 196633, 59032, 209046, 39321] in tools.py . I want to know how these numbers get. Because if I want to use other datasets, I need to know how they get and change them for my dataset. Thank you.

ooooohhhhhxxx commented 1 year ago

I think the numbers in class_weights represent the total amount of points of each class(from the RandLA-Net author replied on RandLA-Net repositories), but what I'm wondering is there only 8 classes in semantic3D (9 classes if count in unlabeled points) and 13 classes in S3DIS, so I don't know why there is 14 weights. I also want to use my own data to train model, have you done it?

ooooohhhhhxxx commented 1 year ago

class_weights = [1938651, 1242339, 608870, 1699694, 2794560, 195000, 115990, 549838, 531470, 292971, 196633, 59032, 209046, 39321] in tools.py . I want to know how these numbers get. Because if I want to use other datasets, I need to know how they get and change them for my dataset. Thank you.

Hi, I have changed weight to my dataset(like I said in previous comment, my dataset has 19 classes and I changed weights to the amount of each class), I successfully run the train.py with argument dataset_sampling as naive but when I use active_learning sampling method it occurred an error (cuDNN error:CUDNN_STATUS_EXECUTION_FAILED) and this error not occured when I use semantic3d as dataset, I am still try to find out why.

A-Chas commented 1 year ago

class_weights = [1938651, 1242339, 608870, 1699694, 2794560, 195000, 115990, 549838, 531470, 292971, 196633, 59032, 209046, 39321] in tools.py . I want to know how these numbers get. Because if I want to use other datasets, I need to know how they get and change them for my dataset. Thank you.

Hello, I also have this problem now. My own dataset category is 4, class The program can run when the weight is 4, class An error will be reported if the weight is 5. However, there will always be a category whose Accuracy and Iou are 0. Please tell me what code needs to be changed if you want to run your own dataset. If we can, we can add a friend to communicate: 1002923065@qq.com === EPOCH 1/6 === Training loss: 1.5586808 Validation loss: 2.9165625
Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.139 | 0.040 | 0.760 | 0.156 | 0.463 Validation: | 0.000 | 0.000 | 0.991 | 0.009 | 0.576 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.058 | 0.009 | 0.409 | 0.048 | 0.138 Validation: | 0.000 | 0.000 | 0.575 | 0.004 | 0.330 Time elapsed: 8 min 51 s === EPOCH 2/6 === Training loss: 1.0715053 Validation loss: 1.0353577
Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.100 | 0.012 | 0.933 | 0.048 | 0.561 Validation: | 0.850 | 0.000 | 0.990 | 0.000 | 0.696 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.053 | 0.003 | 0.548 | 0.015 | 0.175 Validation: | 0.672 | 0.000 | 0.654 | 0.000 | 0.622 Time elapsed: 8 min 44 s === EPOCH 3/6 === Training loss: 1.2013940 Validation loss: 2.4099397
Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.314 | 0.002 | 0.909 | 0.005 | 0.568 Validation: | 0.000 | 0.000 | 0.983 | 0.000 | 0.564 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.110 | 0.000 | 0.560 | 0.001 | 0.192 Validation: | 0.000 | 0.000 | 0.564 | 0.000 | 0.360

A-Chas commented 1 year ago

I think the numbers in class_weights represent the total amount of points of each class(from the RandLA-Net author replied on RandLA-Net repositories), but what I'm wondering is there only 8 classes in semantic3D (9 classes if count in unlabeled points) and 13 classes in S3DIS, so I don't know why there is 14 weights. I also want to use my own data to train model, have you done it?

Hello, I also have this problem now. My own dataset category is 4, class The program can run when the weight is 4, class An error will be reported if the weight is 5. However, there will always be a category whose Accuracy and Iou are 0. Please tell me what code needs to be changed if you want to run your own dataset. If we can, we can add a friend to communicate: 1002923065@qq.com === EPOCH 1/6 === Training loss: 1.5586808 Validation loss: 2.9165625 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.139 | 0.040 | 0.760 | 0.156 | 0.463 Validation: | 0.000 | 0.000 | 0.991 | 0.009 | 0.576 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.058 | 0.009 | 0.409 | 0.048 | 0.138 Validation: | 0.000 | 0.000 | 0.575 | 0.004 | 0.330 Time elapsed: 8 min 51 s === EPOCH 2/6 === Training loss: 1.0715053 Validation loss: 1.0353577 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.100 | 0.012 | 0.933 | 0.048 | 0.561 Validation: | 0.850 | 0.000 | 0.990 | 0.000 | 0.696 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.053 | 0.003 | 0.548 | 0.015 | 0.175 Validation: | 0.672 | 0.000 | 0.654 | 0.000 | 0.622 Time elapsed: 8 min 44 s === EPOCH 3/6 === Training loss: 1.2013940 Validation loss: 2.4099397 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.314 | 0.002 | 0.909 | 0.005 | 0.568 Validation: | 0.000 | 0.000 | 0.983 | 0.000 | 0.564 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.110 | 0.000 | 0.560 | 0.001 | 0.192 Validation: | 0.000 | 0.000 | 0.564 | 0.000 | 0.360

lifangyan16 commented 1 year ago

I think the numbers in class_weights represent the total amount of points of each class(from the RandLA-Net author replied on RandLA-Net repositories), but what I'm wondering is there only 8 classes in semantic3D (9 classes if count in unlabeled points) and 13 classes in S3DIS, so I don't know why there is 14 weights. I also want to use my own data to train model, have you done it?

Hello, I also have this problem now. My own dataset category is 4, class The program can run when the weight is 4, class An error will be reported if the weight is 5. However, there will always be a category whose Accuracy and Iou are 0. Please tell me what code needs to be changed if you want to run your own dataset. If we can, we can add a friend to communicate: 1002923065@qq.com === EPOCH 1/6 === Training loss: 1.5586808 Validation loss: 2.9165625 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.139 | 0.040 | 0.760 | 0.156 | 0.463 Validation: | 0.000 | 0.000 | 0.991 | 0.009 | 0.576 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.058 | 0.009 | 0.409 | 0.048 | 0.138 Validation: | 0.000 | 0.000 | 0.575 | 0.004 | 0.330 Time elapsed: 8 min 51 s === EPOCH 2/6 === Training loss: 1.0715053 Validation loss: 1.0353577 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.100 | 0.012 | 0.933 | 0.048 | 0.561 Validation: | 0.850 | 0.000 | 0.990 | 0.000 | 0.696 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.053 | 0.003 | 0.548 | 0.015 | 0.175 Validation: | 0.672 | 0.000 | 0.654 | 0.000 | 0.622 Time elapsed: 8 min 44 s === EPOCH 3/6 === Training loss: 1.2013940 Validation loss: 2.4099397 Accuracy | 0 | 1 | 2 | 3 | OA Training: | 0.314 | 0.002 | 0.909 | 0.005 | 0.568 Validation: | 0.000 | 0.000 | 0.983 | 0.000 | 0.564 IoU | 0 | 1 | 2 | 3 | mIoU Training: | 0.110 | 0.000 | 0.560 | 0.001 | 0.192 Validation: | 0.000 | 0.000 | 0.564 | 0.000 | 0.360

I suggest you install a Pycharm. These kinds of issues are usually because of dimension of array.