Closed hzxie closed 4 years ago
I also want to ask a question about uniform loss. According to equation 4 in the paper, |S_j| = M = 50, \hat{n} = rNp. As mentioned in Sec. 4.1, p = rd^2 and rN = 1024. So the term U{imbalance}(S_j) = (50 - 1024 x p)^2 / (1024 x p).
Is it correct?
I analyze the code and find that
https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L110-L139
is the one used by the project. But the implementation is different from that declared in the paper.
For example,
# expect_len = tf.sqrt(2*disk_area/1.732)
is not used.
I think neither the paper nor the code gives a clear explanation for the uniform loss.
I wonder whether the values in Table 1 are calculated with equation 6 in the paper.
@liruihui Could you answer the questions above for me? Thank you.
I noticed that you closed the issue #9 and #10 two hours ago.
There are four uniform losses definition in the source code.
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L50-L86
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L89-L103
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L110-L139
- https://github.com/liruihui/PU-GAN/blob/master/Common/model_utils.py#L307-L315
Could you tell me which one to use?
The third one is used for training. For evaluation, we can use the GT mesh, you can check the https://github.com/liruihui/PU-GAN/blob/master/evaluate.py#L53-L102
.
Ruihui Li
I also want to ask a question about uniform loss. According to equation 4 in the paper, |S_j| = M = 50, \hat{n} = rNp. As mentioned in Sec. 4.1, p = rd^2 and rN = 1024. So the term U{imbalance}(S_j) = (50 - 1024 x p)^2 / (1024 x p).
Is it correct?
M is the number of seed point and it is not the number of point inside S_j.
Ruihui Li
There are four uniform losses definition in the source code.
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L50-L86
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L89-L103
- https://github.com/liruihui/PU-GAN/blob/master/Common/loss_utils.py#L110-L139
- https://github.com/liruihui/PU-GAN/blob/master/Common/model_utils.py#L307-L315
Could you tell me which one to use?
The third one is used for training. For evaluation, we can use the GT mesh, you can check the
https://github.com/liruihui/PU-GAN/blob/master/evaluate.py#L53-L102
.Ruihui Li
Sorry for the misleading. Here I want to provide all my scripts and someone may extend it with a better one.
Ruihui Li
Thank you very much for your kind reply.
💯
Hi @liruihui
What are disk_idx.txt
, radius.txt
, and point2mesh_distance.txt
?
I found they are generated by evaluation.cpp
. However, it seems that the program takes GT as input.
Could you tell me how to generate these files without ground truth (such as on KITTI)?
You can find all the files here. https://github.com/liruihui/PU-GAN/blob/master/evaluation_code/evaluation.cpp The compile config is referred in PU-Net
There are four uniform losses definition in the source code.
Could you tell me which one to use?