Skip to content
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

How to use faster rcnn? #10

Closed
Yassin-fan opened this issue Sep 17, 2021 · 5 comments
Closed

How to use faster rcnn? #10

Yassin-fan opened this issue Sep 17, 2021 · 5 comments

Comments

@Yassin-fan
Copy link

您好,打扰了!请问目前编译 jwyang/faster-rcnn.pytorch,是需要将您仓库中的fasterRCNN目录下文件替换为https://github.com/jwyang/faster-rcnn.pytorch 中文件、修改https://github.com/yrcong/STTran/blob/main/fasterRCNN/lib/model/faster_rcnn/faster_rcnn.py 中代码,然后按照 jwyang/faster-rcnn.pytorch 的readme要求进行编译吗?此外, jwyang中的faster rcnn对于环境的要求似乎与您readme中的环境不同,请问会有影响吗?

@yrcong
Copy link
Owner

yrcong commented Sep 17, 2021

我使用的是python3.6 pytorch1.1 CUDA10 RTX2080ti, 运行yang的repo没有问题。

使用fasterrcnn我推荐像@lalalababa说的,对照着 https://github.com/jwyang/faster-rcnn.pytorch 的代码目录把我repo中fasterRCNN/lib/model文件夹下的编译文件删除,重新编译。应该最简单方便

@Yassin-fan
Copy link
Author

Yassin-fan commented Sep 22, 2021

您好:
感谢您的分享!我尝试将fasterRCNN/lib/model文件夹下的_C.cpython-36m-x86_64-linux-gnu.so删除,并按照jwyang/faster-rcnn.pytorch中的pytorch-1.0分支要求进行编译,似乎安装成功了。
在我想要下一步时,遇到新的问题:
1.您的数据集目录为action_genome,请问此目录需要新建在根目录下吗?或是在data下建立?
2.在JingweiJ/ActionGenome中的Dump frames部分,需要加参数 --all_frames 吗?

@yrcong
Copy link
Owner

yrcong commented Sep 26, 2021

Hi,1.您可以自己在代码里设置数据集目录,无论是根目录还是relative path都可以只要正确就行
2. 我记得不需要all frames因为并不是所有frames都有annotations不过你dump所有frames应该也没关系

@Yassin-fan
Copy link
Author

Hi,1.您可以自己在代码里设置数据集目录,无论是根目录还是relative path都可以只要正确就行
2. 我记得不需要all frames因为并不是所有frames都有annotations不过你dump所有frames应该也没关系

感谢回复!目前已经成功处理数据集,在运行代码时,似乎在 class 词向量转化出错,报错如下:
nohup: ignoring input
The CKPT saved here: /data1/ymf/STTran/data/save_path/
spatial encoder layer num: 1 / temporal decoder layer num: 3
mode : predcls
save_path : /data1/ymf/STTran/data/save_path/
model_path : None
data_path : /data1/ymf/STTran/data/scene_understanding/action_genome/
datasize : large
ckpt : None
optimizer : adamw
lr : 1e-05
nepoch : 10
enc_layer : 1
dec_layer : 3
bce_loss : False
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 7584 videos and 177330 valid frames
144 videos are invalid (no person), remove them
49 videos are invalid (only one frame), remove them
21643 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------loading annotations---------slowly-----------
--------------------finish!-------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
There are 1750 videos and 56923 valid frames
41 videos are invalid (no person), remove them
19 videos are invalid (only one frame), remove them
8636 frames have no human bbox in GT, remove them!
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
loading word vectors from data/glove.6B.200d.pt
loading word vectors from /data1/ymf/STTran/data/glove.6B.200d.pt
background -> background
fail on background

看起来应该是在“background”转化为词向量时出错,请问该如何解决呢?

@yrcong
Copy link
Owner

yrcong commented Sep 28, 2021

这不是error, 因为在GloVE model中没有__background__这个词向量,所以没有载入pretrained的embedding而已。

并不影响模型运行,model中也没有使用这个embedding

@yrcong yrcong closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants