jeffreyyihuang/two-stream-action-recognition

choose Only Testing , but still train data

sxzy opened this issue · 31 comments

sxzy commented

hello , a new learner here.
I have choose the Only Testing. but the result shows that it still train data. it is so weird.
can any one give me some tips.
THX

gaosh commented

Didn't notice this new issue, what are the results you got? like screen shot, etc.

sxzy commented

Didn't notice this new issue, what are the results you got? like screen shot, etc.

Hmm. first really thank your nice reply.
when I choose the only testing , I think it should test the result .
but it is still training .
when I run

python spatial_cnn.py --resume /home/lenovo/xuzeshan/two-stream-action-recognition --evaluate

the screen shows below:
image

I am confusing why it is still training. I am a new learner here ,and I have not totally understand the code .I am trying to understand .so ....

It looks like you don't have any pretrained model. Try to specify the absolute path of your pretrained model, not just the directory.

gaosh commented

Yeah, @jmessou is right. you can refer to line 87 in spatial_cnn.py
if os.path.isfile(self.resume)
This line of code will verify whether provided path is a file or not first.

sxzy commented

@jmessou @gaosh yep. Thanks.It really help.
I noticed.and I tried again.the result shows as below
and I have run the model yesterday.because of the limit of GPu.I just set the batch into 5.
and I noticed that the size of training data is far smaller than the size of validate data.
It is a little strange.
I think we should set the size of training data bigger than validate's ,isn't it?
and the LR is very slow,5e-09。
image

gaosh commented

The code from this repository reproduce the training procedure from temporal segment network(TSN). In TSN, during training, they sample three times from a video, during testing, they sample 20 times from a video. As a result, the testing frames is much more than training frames. The default LR is 1e-2 for motion cnn, and 5e-4 for spatial cnn.

hello , a new learner here.
I have choose the Only Testing. but the result shows that it still train data. it is so weird.
can any one give me some tips.
THX

I'm a new learner too.How to modify the function to fit my UCF101 data?

snipaste_2018-10-21_17-15-49

snipaste_2018-10-21_17-18-26

sxzy commented

hello , a new learner here.
I have choose the Only Testing. but the result shows that it still train data. it is so weird.
can any one give me some tips.
THX

I'm a new learner too.How to modify the function to fit my UCF101 data?

snipaste_2018-10-21_17-15-49 snipaste_2018-10-21_17-18-26

just replace it to your own data path

      @jmessou @gaosh  yep.  Thanks.It really help.

I noticed.and I tried again.the result shows as below
and I have run the model yesterday.because of the limit of GPu.I just set the batch into 5.
and I noticed that the size of training data is far smaller than the size of validate data.
It is a little strange.
I think we should set the size of training data bigger than validate's ,isn't it?
and the LR is very slow,5e-09。
image

Were you able to get it work? I tried
python spatial_cnn.py --resume PATH_TO_PRETRAINED_MODEL --evaluate
but it still trained the model, and crashed. I did replace the model path to my model file with full path.

sxzy commented
      @jmessou @gaosh  yep.  Thanks.It really help.

I noticed.and I tried again.the result shows as below
and I have run the model yesterday.because of the limit of GPu.I just set the batch into 5.
and I noticed that the size of training data is far smaller than the size of validate data.
It is a little strange.
I think we should set the size of training data bigger than validate's ,isn't it?
and the LR is very slow,5e-09。
image

Were you able to get it work? I tried
python spatial_cnn.py --resume PATH_TO_PRETRAINED_MODEL --evaluate
but it still trained the model, and crashed. I did replace the model path to my model file with full path.

I think you can ignore the training part ,and when it trained ,it will evaluate,and that is the evaluate result.

@sxzy Thanks for clarifying it. I am only using CPU. Would it be a problem?

@sxzy I have the same problem, for some reason --evaluate still does the training, were you able to fix it? Besides the training seems very volatile, the validation loss keeps oscillating but does not really improve, is this the same case for you?

      @jmessou @gaosh  yep.  Thanks.It really help.

I noticed.and I tried again.the result shows as below
and I have run the model yesterday.because of the limit of GPu.I just set the batch into 5.
and I noticed that the size of training data is far smaller than the size of validate data.
It is a little strange.
I think we should set the size of training data bigger than validate's ,isn't it?
and the LR is very slow,5e-09。
image

Were you able to get it work? I tried
python spatial_cnn.py --resume PATH_TO_PRETRAINED_MODEL --evaluate
but it still trained the model, and crashed. I did replace the model path to my model file with full path.

I think you can ignore the training part ,and when it trained ,it will evaluate,and that is the evaluate result.

I don't think this will be the test, because the training model updates parameters, so evaluation is part of training.

你好,这是一个新的学习者。
我选择了Only Testing。但结果表明它仍在训练数据。太奇怪了。
任何人都可以给我一些提示。
谢谢

你好,博主公布的预训练模型能不能发我一份,在GitHub上下载不了,我邮箱1092940968@qq.com,非常感谢

@sxzy我有同样的问题,出于某种原因 - 评估仍然进行培训,你能解决它吗?除了训练看起来非常不稳定,验证损失仍在振荡,但并没有真正改善,这对你来说是一样的情况吗?

你好,博主公布的预训练模型能不能发我一份,在GitHub上下载不了,我邮箱1092940968@qq.com,非常感谢

This problem persists. I don't think it makes sense to keep the training running, then it behaves like validation and not real testing because the model keeps being trained. @jeffreyhuang1 Can you please help us with this issue? Many thanks.

@sxzy 大佬,新手小白问个问题,这里根本就没有testing set, 只有train 和validation ,我们怎么test

Quxyz commented

hello , a new learner here.
I have choose the Only Testing. but the result shows that it still train data. it is so weird.
can any one give me some tips.
THX
Excuse me, I am also a new learner , and I just can't run the code. Could you please tell me your environment? Like the version of pytorch 、 cuda or something else, do I need Pytorch1.0+? Appreciate it.

      @jmessou @gaosh  yep.  Thanks.It really help.

I noticed.and I tried again.the result shows as below
and I have run the model yesterday.because of the limit of GPu.I just set the batch into 5.
and I noticed that the size of training data is far smaller than the size of validate data.
It is a little strange.
I think we should set the size of training data bigger than validate's ,isn't it?
and the LR is very slow,5e-09。
image

Were you able to get it work? I tried
python spatial_cnn.py --resume PATH_TO_PRETRAINED_MODEL --evaluate
but it still trained the model, and crashed. I did replace the model path to my model file with full path.

I think you can ignore the training part ,and when it trained ,it will evaluate,and that is the evaluate result.

hello,did you run this program successfully? Is this program useful?
The download sets are the data set?
Can you guide me on how to set the data set path? I got an error as following:
No such file or directory:'/home/ange/TSCNNdataset/ucf101/Swing/separated_images/v_Swing_g09_c02/v_Swing_g09_c02_22.jpg'

we download the datasets but there isn't a directory 'Swing/seperated_images'. Looking forward to your reply,thanks a lot.

@sxzy
hello,did you run this program successfully? Is this program useful?
The download sets are the data set?
Can you guide me on how to set the data set path? I got an error as following:
No such file or directory:'/home/ange/TSCNNdataset/ucf101/Swing/separated_images/v_Swing_g09_c02/v_Swing_g09_c02_22.jpg'

we download the datasets but there isn't a directory 'Swing/seperated_images'. Looking forward to your reply,thanks a lot.

Quxyz commented

@Quxyz 您好!我最近该开始研究双流网络,非常感谢您的回复。给了我非常大的帮助。
在我运行这个程序的时候,我只修改了readme中提及的path,将它修改为,下载后合并并解压之后的文件夹的位置。程序的其他位置并没有修改,程序运行出错,您觉得我是什么地方没理解对?
请问您在修改路径的时候是怎样修改的?
特别期望您能指教一下,非常感谢!

Quxyz commented

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

Quxyz commented

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

Quxyz commented

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

我在跑着motion.cnn呢,,,等我跑完我试一下,或者你可以试试你跑motion.cnn(only test)能行不?我跑motion.cnn目前还没有遇到代码错误。如果你motion.cnn能行的话就应该可以证明是spatial路径写错了。

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

我在跑着motion.cnn呢,,,等我跑完我试一下,或者你可以试试你跑motion.cnn(only test)能行不?我跑motion.cnn目前还没有遇到代码错误。如果你motion.cnn能行的话就应该可以证明是spatial路径写错了。

有道理,我试一下,看结果我们再交流。非常感谢。

Quxyz commented

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

我在跑着motion.cnn呢,,,等我跑完我试一下,或者你可以试试你跑motion.cnn(only test)能行不?我跑motion.cnn目前还没有遇到代码错误。如果你motion.cnn能行的话就应该可以证明是spatial路径写错了。

有道理,我试一下,看结果我们再交流。非常感谢。

您好,请问你这个问题解决了吗,我也遇到了相同的问题。

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

我在跑着motion.cnn呢,,,等我跑完我试一下,或者你可以试试你跑motion.cnn(only test)能行不?我跑motion.cnn目前还没有遇到代码错误。如果你motion.cnn能行的话就应该可以证明是spatial路径写错了。

有道理,我试一下,看结果我们再交流。非常感谢。

您好,请问你这个问题解决了吗,我也遇到了相同的问题。

您好!我已经发现问题所在了,我们所下载的数据集和原始程序中使用的数据集文件目录是不一致的,连最终的用图片名也不相同,需要将原始程序索引的图片进行修改。只要能让程序找到数据集的图片就行了,这是我修改的部分程序。
InkedTIM截图20191112102646_LI

Quxyz commented

@Quxyz InkedTIM截图20191103212433_LI
这就是我遇到的问题,以及我修改代码的地方。您看我的和您的有啥区别吗?

我这个地方没有改因为我只需要测试一下光流部分就可以了,我改的是相应的motion.cnn.py,和你这个相同的地方我的路径最后部分是/ucf101/tv1_flow。
你的这个是1.2里面提供的原始ucf101是吧?我其实很建议你用1.3里面那个预处理好了的101数据

其实我也是使用下载的数据集的,解压之后是jpegs_256的一个文件夹,以这个作为路径也不对。这个问题困扰我好久了,我快怀疑是不是代码出了问题。你能试试你跑spatial_cnn会出错吗?

我在跑着motion.cnn呢,,,等我跑完我试一下,或者你可以试试你跑motion.cnn(only test)能行不?我跑motion.cnn目前还没有遇到代码错误。如果你motion.cnn能行的话就应该可以证明是spatial路径写错了。

有道理,我试一下,看结果我们再交流。非常感谢。

您好,请问你这个问题解决了吗,我也遇到了相同的问题。

您好!我已经发现问题所在了,我们所下载的数据集和原始程序中使用的数据集文件目录是不一致的,连最终的用图片名也不相同,需要将原始程序索引的图片进行修改。只要能让程序找到数据集的图片就行了,这是我修改的部分程序。
InkedTIM截图20191112102646_LI

感谢!我也意识到应该是这个问题了,正在修改。方便的话您可以把您修改后的spatial_dataloader.py文件发我一份吗,感谢!我的邮箱是1363441969@qq.com