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

how to training custom dataset? #37

Open
xueyoo opened this issue Nov 21, 2022 · 11 comments
Open

how to training custom dataset? #37

xueyoo opened this issue Nov 21, 2022 · 11 comments

Comments

@xueyoo
Copy link

xueyoo commented Nov 21, 2022

when I use wireframe dataset, and the result is successfully, but when use custom datase, the result is very bad.
could you provide some detail information or some comment for train custom dataset?

thanks

@cherubicXN
Copy link
Owner

Because of the annotation bias, the model (HAWPv2) trained on the Wireframe dataset may be failed. So, I extended HAWP to self-supervised learning.

For the training on your custom data, you may need to follow the data format of HAWPv2 to prepare the train.json file. Meanwhile, you need to add your dataset into paths_catalog.py.

@xxx0320
Copy link

xxx0320 commented Nov 23, 2022

Hello, I am new to line segment, how can I generate ann['edges_negative']. Thanks!

@xueyoo
Copy link
Author

xueyoo commented Nov 24, 2022

@cherubicXN thanks for your kindly reply!
can ssl support for long curve ?
from the image docs/figures/v3-BSDS/42049.png, it seems support long curve.
but i am not sure which junction to label in long curve, could you give some information for this case? thanks

@cherubicXN
Copy link
Owner

Hi, the "negative edges" was presented in L-CNN and I followed their configuration in the conference version. For the latest version, you can safely set dummy negative edges as [(0,0)] because we did not use the static negative edges during training. I plan to remove the hard requirements for the static negative edges in the next version.

@cherubicXN
Copy link
Owner

For the HAWPv3 model, we practically found that it could handle the long curves, but it would be failed in some cases. The model hawpv3-imagenet-03a84.pth trained on ImageNet-small usually works better than the one we used in our main paper.

In my opinion, annotating long curves would be very challenging due to the inherent ambiguity. For example, if we are going to annotate a large circle, any point on the circle can be labeled as a junction.

Based on this ambiguity, if I were labeling the long curves with images, I would like to annotate some salient edge points as the junctions or use an off-the-shelf detector to assist the labeling. You can try it.

@Ciciluang
Copy link

hello,I was wondering how to generate ann['edges_positive']?or can you tell me how to generate the json file for hawpv2 code?

@cherubicXN
Copy link
Owner

edges_positive is an Nx2 list with the endpoint indices. For example, if we have four junctions $(x_0,y_0), \ldots, (x_3,y_3)$ and 5 line segments $(x_0, y_0) \rightarrow (x_1, y_1)$, $(x_1, y_1) \rightarrow (x_2, y_2)$, $(x_2, y_2) \rightarrow (x_3, y_3)$, $(x_3, y_3) \rightarrow (x_0, y_0)$, $(x_0, y_0) \rightarrow (x_2, y_2)$, then the pairs of indices are (0,1), (1,2), (2,3), (0,2). So the edges_positive should be

edges_positive = [[0,1],[1,2],[2,3],[3,0], [0,2]]

@cherubicXN
Copy link
Owner

cherubicXN commented Dec 9, 2022

The latex codes are generated by chatGPT! Here is a screenshot
image

@Ciciluang
Copy link

Is the line segment depend on the ground truth? or randomly generate by the endpoint indices in edges_positive ?

@cherubicXN
Copy link
Owner

It is, of course, the ground truth. I show the example to illustrate the data format.

@hphuongdhsp
Copy link

Can I ask more about the format of the junction and edges_positive?
In the case that there is no junction in an image, what do egdes_positive and lines look like?

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