xjgaocs / Trans-SVNet

26 stars 5 forks source link

Questions about tool label in get_path_label.py #12

Open QYixuan opened 1 year ago

QYixuan commented 1 year ago

Hi, Thanks to your excellent work, I was debugging the get_path_label.py file today and found a problem I hadn't noticed before. In the paragraph starting around line 185 (which may not be the same number of lines as your original version), when you split the tool labels for each phase and input them into the info_all array, your code is:

# TODO
count_tool = 0
first_line = True
for tool_line in tool_file:
    tool_split = tool_line.split()
    if first_line:
        first_line = False
        continue
    if int(tool_split[0]) % downsample_rate == 0:
        info_all[count_tool].append(int(tool_split[0 + 1]))
        info_all[count_tool].append(int(tool_split[4 + 1]))
        info_all[count_tool].append(int(tool_split[2 + 1]))
        info_all[count_tool].append(int(tool_split[3 + 1]))
        info_all[count_tool].append(int(tool_split[5 + 1]))
        info_all[count_tool].append(int(tool_split[6 + 1]))
        info_all[count_tool].append(int(0))
        count_tool += 1

My question is why is it entered here in the order 1,5,3,4,6,7 and the number 0 is added at the end. so that the tool 2 label information is not entered into the array. I notice that you have marked the TODO comment here, although you did not use this tool label in your subsequent codes, your design thinking at the time was very helpful to my work, thank you very much! Looking forward to your reply!