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

class_weights #41

Open
lifangyan16 opened this issue Sep 20, 2022 · 5 comments
Open

class_weights #41

lifangyan16 opened this issue Sep 20, 2022 · 5 comments

Comments

@lifangyan16
Copy link

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
Copy link

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
Copy link

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
Copy link

A-Chas commented Jan 25, 2023

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: [email protected]
=== 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
Copy link

A-Chas commented Jan 25, 2023

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: [email protected]
=== 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
Copy link
Author

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: [email protected] === 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.

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

3 participants