-
Notifications
You must be signed in to change notification settings - Fork 239
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
Could you open source the preprocess projection code #37
Comments
The images are depth image ,I turn the value to uint8, and multiply it by 8, for visualization. |
Hey @jingleFun, have you found a solution to your problem? I am trying to achieve the same. |
@Lapayo Sorry, I have no solution . |
@jingleFun @Lapayo I wrote a code for this , i am sure your post code had some error, but i can not sure i am right; |
i can give the code to you to check; |
@lonlonago Can you share your code with me? I also have problem about this! |
my mail is [email protected] @MoonWolf9067 |
I have solved the problem. |
So cool!!! @lonlonago How did you solve it? |
send me a mail
…---Original---
From: "MoonWolf9067"<[email protected]>
Date: Sun, May 26, 2019 17:01 PM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Mention"<[email protected]>;"SlowLon"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
@lonlonago Can you share your code with me? I also have problem about this!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@lonlonago, I have used your code, but still some black line in the range-image. I don't know why, if i use it in wrong way? |
i will check it tomorror
…---Original---
From: "Peeta586"<[email protected]>
Date: Tue, Jun 18, 2019 21:03 PM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Mention"<[email protected]>;"SlowLon"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
@lonlonago, I have used your code, but still some black line in the range-image. I don't know why, if i use it in wrong way?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
thank you
…---Original---
From: "SlowLon"<[email protected]>
Date: Tue, Jun 18, 2019 21:17 PM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Peeta586"<[email protected]>;"Comment"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
i will check it tomorror
---Original---
From: "Peeta586"<[email protected]>
Date: Tue, Jun 18, 2019 21:03 PM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Mention"<[email protected]>;"SlowLon"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
@lonlonago, I have used your code, but still some black line in the range-image. I don't know why, if i use it in wrong way?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
`def lidar_to_2d_front_view_3(points, v_res=26.9/64,
|
大神,thanks very much, by the way, threshold_angle=np.radians(250)是什么意思?为何取250度呢? 谢谢!
…---Original---
From: "SlowLon"<[email protected]>
Date: Wed, Jun 19, 2019 10:50 AM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Peeta586"<[email protected]>;"Comment"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
`def lidar_to_2d_front_view_3(points, v_res=26.9/64,
h_res=0.17578125
# h_res=0.08
):
"""
VRES = 0.42 # vertical resolution 26.9/64=0.42
HRES = 0.17578125 # horizontal resolution 90/512
""" x_lidar = points[:, 0] # -71~73 y_lidar = points[:, 1] # -21~53 z_lidar = points[:, 2] # -5~2.6 r_lidar = points[:, 3] # Reflectance 0~0.99 # Distance relative to origin d = np.sqrt(x_lidar ** 2 + y_lidar ** 2 + z_lidar ** 2) # Convert res to Radians v_res_rad = np.radians(v_res) h_res_rad = np.radians(h_res) # PROJECT INTO IMAGE COORDINATES # 这里的负号去掉后,图片会左右颠倒,但是为什么之前是反的? # -1024~1024 -3.14~3.14 ; x_img_2 = np.arctan2(-y_lidar, x_lidar)# 得到水平角度 # 用它求得的值域只有上面的一半?因为r始终是正数,导致反面的和正面的投影都在一起了 # x_img_2 = -np.arcsin(y_lidar/r) # 水平转角 -1.57~1.57 angle_diff = np.abs(np.diff(x_img_2)) threshold_angle = np.radians(250) # angle_diff = np.hstack((angle_diff, 0.001)) # 补一个元素,diff少了一个 angle_diff_mask = angle_diff > threshold_angle # print('angle_diff_mask',np.sum(angle_diff_mask), threshold_angle) x_img = np.floor((x_img_2 / h_res_rad)).astype(int) # 把角度转换为像素坐标 x_img -= np.min(x_img) # 把坐标为负数的部分做一个转移 # x_img[x_lidar < 0] = 0 # 只取x大于0的部分,因为小于0的部分相当于是雷达后面的视角 # 不是我们需要的数据,并且arcsin 计算会重复; # -52~10 -0.4137~0.078 # y_img_2 = -np.arctan2(z_lidar, r) # # 这个值域没有变化,但是需要加一个负号图像才是正的,不然上下颠倒 # y_img_2 = -np.arcsin(z_lidar/d) # 得到垂直方向角度 # y_img = np.round((y_img_2 / v_res_rad)).astype(int) # # 把角度转换为像素坐标 # y_img -= np.min(y_img) # 把坐标为负数的部分做一个转移 # y_img[y_img >= 64] = 63 # 有可能会超出64根线,需要做一点限制 y_img[y_img >= 64] = 63 # 有可能会超出64根线,需要做一点限制 x_max = int(360.0 / h_res) + 1 # 投影后图片的宽度 # x_max = int(180.0 / h_res) + 1 # 投影后图片的宽度 # 根据论文的5维特征赋值 depth_map = np.zeros((64, x_max, 5))#+255 depth_map[y_img, x_img, 0] = x_lidar depth_map[y_img, x_img, 1] = y_lidar depth_map[y_img, x_img, 2] = z_lidar depth_map[y_img, x_img, 3] = r_lidar depth_map[y_img, x_img, 4] = d # 抽取最中间的90度视角数据,也就是512个像素的宽度,64高度的数据 start_index = int(x_max/2 - 256) result = depth_map[:, start_index:(start_index+512), :] np.save(os.path.join('../data/samples/0001-3' + '.npy'), result) print('write 0001-2')`
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
旋转一周的转折点,超过一定角度都可以,任意取值, |
这里的横线应该是kitti数据的问题导致的,它的y计算的并不准确,所以换了种方式处理。 |
嗯嗯,明白了😊,非常感谢!
…---Original---
From: "SlowLon"<[email protected]>
Date: Thu, Jun 20, 2019 15:51 PM
To: "BichenWuUCB/SqueezeSeg"<[email protected]>;
Cc: "Peeta586"<[email protected]>;"Comment"<[email protected]>;
Subject: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
旋转一周的转折点,超过一定角度都可以,任意取值,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@lonlonago I'm also getting those black lines using your code. Any idea on how this could be fixed? |
@lonlonago the projection code has errors. Can you paste again a working code? |
很开心看到您的评论,我也想要得到一份您的代码用来研究学习,已经向您发送了qq邮件,非常感谢。 |
您发送的邮件已经收到。。。
|
@Durant35 请问您有正确的代码吗,可以给我一份吗?万分感谢 |
@lonlonago 谢谢,刚刚忘记艾特您了 |
请问您有投影的相关代码吗,可以给我一份吗,谢谢
…------------------ 原始邮件 ------------------
发件人: "BichenWuUCB/SqueezeSeg" ***@***.***>;
发送时间: 2022年1月20日(星期四) 上午8:50
***@***.***>;
***@***.******@***.***>;
主题: Re: [BichenWuUCB/SqueezeSeg] Could you open source the preprocess projection code (#37)
您发送的邮件已经收到。。。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
|
I followed https://github.com/Durant35/SqueezeSeg/blob/master/src/nodes/segment_node.py by @Durant35. But the code seems something wrong, show as below.
the first one is visualized by opencv from your npy file, the second one is created by the code from durant, they are the same frame from kitti. but they looks something different. And with such preprocess, the training result is very bad. Could you open source the projection code? @BichenWuUCB
The text was updated successfully, but these errors were encountered: