TonyXuQAQ / RNGDetPlusPlus

Official repo of paper RNGDet++: Road Network Graph Detection by Transformer with Instance Segmentation and Multi-scale Features Enhancement
GNU General Public License v3.0
89 stars 14 forks source link

How does a road without an intersection generate a label? #3

Closed GuoxingYan closed 2 years ago

GuoxingYan commented 2 years ago

in create_label.py if (len(src.neighbor_edges)<=1 and len(dst.neighbor_edges)<=1) The code here filters out the roads without intersection points (only the roads with the start and end points).

But this kind of data occurs frequently on datasets that are divided into smaller pieces.

Also, when does your department plan to train open source code?

We look forward to your reply. Thank you.

TonyXuQAQ commented 2 years ago

Thanks for the questions.

For the first question, we did not filter out roads without intersections but filtered out roads with only two vertices. Usually, this indicates that the road is very short and we treat such roads as outliers. Some roads may not have interactions, but they usually have multiple vertices, at least more than two vertices. Therefore, in our proposed models, short roads with only two vertices are removed.

For the second question, it may take another two or three months for full code open-source.

GuoxingYan commented 2 years ago

Thanks for the questions.

For the first question, we did not filter out roads without intersections but filtered out roads with only two vertices. Usually, this indicates that the road is very short and we treat such roads as outliers. Some roads may not have interactions, but they usually have multiple vertices, at least more than two vertices. Therefore, in our proposed models, short roads with only two vertices are removed.

For the second question, it may take another two or three months for full code open-source. Before if (len(src.neighbor_edges)<=1 and len(dst.neighbor_edges)<=1)

for k,v in graph.vertices.items(): if len(v.neighbor_edges)==2 and len([e for e in v.neighbor_edges])==2: graph.merge(v.neighbor_edges)

I understand that the route has been simplified here. The rest of the lines are lines of degree 1 or 3. in the small graph after spilt, it is common to have only two vertices, and this line will be removed during label creation.

GuoxingYan commented 2 years ago

在进行 if (len(src.neighbor_edges)<=1 and len(dst.neighbor_edges)<=1) 前,会执行 简化线段的程序 if len(v.neighbor_edges)==2 and len([e for e in v.neighbor_edges])==2: graph.merge(v.neighbor_edges)。 经此之后,只保留度为1或者3以及3以上的线段。 但是在实际生产过程中,我发现大图切分成小图的过程中,有很多线,变成了独立的线,比如高速公路上的线。 类似这种路,在执行 create_label 后会消失掉

TonyXuQAQ commented 2 years ago

Dear Yan,

Thanks for pointing out the problem. Yes you are correct, those lines without intersections are removed and this is a bug. Apologize for my mistake.

However, in Sat2Graph dataset, the input images are extremely huge and roads without intersections are actually not common. So at least in our dataset, the removed roads are still very short ones. But as you mentioned, if you cut large images into small patches, this bug cannot be ignored anymore.

You can comment out codes about road filtering at this stage. I will fix this bug in a later release.

Thanks again for the bug report.

GuoxingYan commented 2 years ago

Dear Yan,

Thanks for pointing out the problem. Yes you are correct, those lines without intersections are removed and this is a bug. Apologize for my mistake.

However, in Sat2Graph dataset, the input images are extremely huge and roads without intersections are actually not common. So at least in our dataset, the removed roads are still very short ones. But as you mentioned, if you cut large images into small patches, this bug cannot be ignored anymore.

You can comment out codes about road filtering at this stage. I will fix this bug in a later release.

Thanks again for the bug report.

Your response was very timely and thank you very much for your response