-
Notifications
You must be signed in to change notification settings - Fork 17
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
data preprocessing #8
Comments
对 而且他这个我看norm_u_v_os这个文件输进去的都是一张光流图片,但是这个模型是要舒输入,水平,垂直,和光应变的,作者给的呢个,不知道他给的光流图片是不是从给的呢个网址得到的, 我在网址上运行了原始数据集起始帧和顶点帧,得到了光流图但是与norm_u_v_os对应的数据集的照片的光流图不同 |
1 similar comment
对 而且他这个我看norm_u_v_os这个文件输进去的都是一张光流图片,但是这个模型是要舒输入,水平,垂直,和光应变的,作者给的呢个,不知道他给的光流图片是不是从给的呢个网址得到的, 我在网址上运行了原始数据集起始帧和顶点帧,得到了光流图但是与norm_u_v_os对应的数据集的照片的光流图不同 |
对他还有这个我看norm_u_v_os这个文件输出进去的都是一张光流图,但是这个模型是要舒输入,水平,垂直,和光应变的,作者给的呢个,不知道他给的光流图是不是从给的呢个网址得到的,我在网址上得到了原始数据集起始帧和运行上游帧,得到了光流图但是与norm_u_v_os对应的数据集照片的光流图不同 |
能给个qq或者微信请教一下这篇论文的数据预处理的一些问题吗? |
我已经不做这个啦哈哈哈,但是我可以给你我的code |
|
感谢感谢,就是我有个疑问,他的模型是要求输入,水平,光流,和光应变,但是作者给的数据集是一个一个光流图,直接就是把每一张光流图输入进去吗?然后通过代码算法提取光流图的水平 ,垂直,和光应变进行后续处理吗?
…------------------ 原始邮件 ------------------
发件人: "christy1206/STSTNet" ***@***.***>;
发送时间: 2023年10月20日(星期五) 下午3:10
***@***.***>;
***@***.******@***.***>;
主题: Re: [christy1206/STSTNet] data preprocessing (Issue #8)
import cv2 import numpy as np def tvl1_ofcalc(path1, path2): img1 = cv2.cvtColor(cv2.imread(path1), cv2.COLOR_BGR2GRAY) img2 = cv2.cvtColor(cv2.imread(path2), cv2.COLOR_BGR2GRAY) flow = cv2.optflow.DualTVL1OpticalFlow_create() of = flow.calc(img1, img2, None) return of def minmax_norm(x): x_flat = x.reshape(-1) x_max = np.max(x) x_min = np.min(x) if x_max == x_min: x_flat *= 0 else: x_flat = (x_flat - x_min)/(x_max - x_min) return x_flat.reshape(x.shape) def calc_os_flow(path1, path2): flow = tvl1_ofcalc(path1, path2) u_flow = minmax_norm(flow[:, :, 0])*255 v_flow = minmax_norm(flow[:, :, 1])*255 ux, uy = np.gradient(flow[:, :, 0]) vx, vy = np.gradient(flow[:, :, 1]) os_flow = np.sqrt(ux ** 2 + vy ** 2 + 0.25 * (uy + vx) ** 2) os_flow = minmax_norm(os_flow)*255 return np.concatenate((os_flow.reshape(*os_flow.shape, 1), v_flow.reshape(*v_flow.shape, 1), u_flow.reshape(*u_flow.shape, 1)), axis=2)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
他的意思就是,他把光流图里面水平、垂直和光应变三个通道拼在一起,作为类似一个三通道图片输入到网络中,光流图提取是预处理,不是后处理,这个项目提供的就是预处理好的32*32的光流图 |
您好,请问您解决了那个光流的问题了吗? @love-coast |
@shialongya 这难道不是图像的类型吗?🤔 |
呢是数据集的标签 表示 积极 消极 其他 |
|
Hi, I am wondering how to preprocess the raw data and transform them into norm_u_v_os.
Can you give me some advice or the preprocess code to this?
The text was updated successfully, but these errors were encountered: