Open iamsusiep opened 4 years ago
My visualization codes are written in several independent jupyter notes, and not included in the main project by now. I will consider releasing them in the future after I organize all the codes.
@KaihuaTang Have you organized the code for the visualization section? This is what I need urgently at present. Even if it is still in jupyter format, can it be made public? Thank you!
@KaihuaTang Have you organized the code for the visualization section? This is what I need urgently at present. Even if it is still in jupyter format, can it be made public? Thank you!
bbox with label & index are drawn on the picture. ground-truth relations and predicted relations are printed as a list. Since the predicted relations are pretty dense, you need to set a threshold to show the top-K. Then I drew the graphs through ppt for the best visual effects.
@KaihuaTang
Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred.
File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in __init__ self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in __init__ obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in __init__ self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
I don't know. I‘ve never seen this bug before.
@KaihuaTang Can you release the visualization code for sgdet results?
@KaihuaTang Can you release the visualization code for sgdet results?
It seems like I may lost this part of codes. The main difference between sgdet visualization and others is a bbox selection function (with threshold), otherwise there would be too many bboxes. I'm currently working on another project, maybe you can write your own.
@KaihuaTang Thanks for the great and tidy code.
@JincanDeng A PR is opened to add the SGDet visualization. Not many changes from the SGCls notebook.
@navidre Thanks for your visualization for the SGDets code. Could you tell me how to get to your visualization results? Especially for the pred scores? The Numerical values seem very small. Why are your results are so big?
@navidre if connenient, could you share the config file for test?
@KaihuaTang Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred.
File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in __init__ self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in __init__ obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in __init__ self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Did you solve this problem? I encountered the same problem. It is very strange that I downloaded glove.6B.zip in the glove folder, but every time I train, it will re-download a file called glove.6B.200d. Please help me, thank you!
@KaihuaTang Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred.
File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in __init__ self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in __init__ obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in __init__ self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Did you solve this problem? I encountered the same problem. It is very strange that I downloaded glove.6B.zip in the glove folder, but every time I train, it will re-download a file called glove.6B.200d. Please help me, thank you!
I'm not sure. Maybe changing the path of the customized GLOVE_DIR in the command?
You can unzip the glove.6b.zip, then train the model.
发自我的iPhone
------------------ Original ------------------ From: Kaihua Tang <notifications@github.com> Date: Mon,Apr 13,2020 10:20 PM To: KaihuaTang/Scene-Graph-Benchmark.pytorch <Scene-Graph-Benchmark.pytorch@noreply.github.com> Cc: Liucheng <785091715@qq.com>, Comment <comment@noreply.github.com> Subject: Re: [KaihuaTang/Scene-Graph-Benchmark.pytorch] Code for scene graph visualization (#2)
@KaihuaTang Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred. File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in init self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in init obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in init self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Did you solve this problem? I encountered the same problem. It is very strange that I downloaded glove.6B.zip in the glove folder, but every time I train, it will re-download a file called glove.6B.200d. Please help me, thank you!
I'm not sure. Maybe changing the path of the customized GLOVE_DIR in the command?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
@KaihuaTang Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred.
File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in __init__ self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in __init__ obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in __init__ self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Did you solve this problem? I encountered the same problem. It is very strange that I downloaded glove.6B.zip in the glove folder, but every time I train, it will re-download a file called glove.6B.200d. Please help me, thank you!
I'm not sure. Maybe changing the path of the customized GLOVE_DIR in the command?
Thank you for your prompt reply!My problem may solved by @Iceland-Leo .Because the zip file I downloaded have problem in unzipping, the system will re-download the unzip file of glove.6B.zip everytime I train the model.
You can unzip the glove.6b.zip, then train the model. 发自我的iPhone … ------------------ Original ------------------ From: Kaihua Tang <notifications@github.com> Date: Mon,Apr 13,2020 10:20 PM To: KaihuaTang/Scene-Graph-Benchmark.pytorch <Scene-Graph-Benchmark.pytorch@noreply.github.com> Cc: Liucheng <785091715@qq.com>, Comment <comment@noreply.github.com> Subject: Re: [KaihuaTang/Scene-Graph-Benchmark.pytorch] Code for scene graph visualization (#2) @KaihuaTang Thank you very much! One more question, when I start training, the glove will be download. But an error ocurred. File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/roi_relation_predictors.py", line 459, in init self.context_layer = VCTreeLSTMContext(config, obj_classes, rel_classes, statistics, in_channels) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/model_vctree.py", line 93, in init obj_embed_vecs = obj_edge_vectors(self.obj_classes, wv_dir=self.cfg.GLOVE_DIR, wv_dim=self.embed_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 152, in obj_edge_vectors wv_dict, wv_arr, wv_size = load_word_vectors(wv_dir, wv_type, wv_dim) File "/mnt/disk/cv/Liucheng/pytorchCode/Scene-Graph-Benchmark.pytorch-master/maskrcnn_benchmark/modeling/roi_heads/relation_head/utils_motifs.py", line 205, in load_word_vectors with zipfile.ZipFile(fname, "r") as zf: File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1131, in init self._RealGetContents() File "/home/cilab-cv/miniconda3/envs/sg/lib/python3.6/zipfile.py", line 1198, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file Did you solve this problem? I encountered the same problem. It is very strange that I downloaded glove.6B.zip in the glove folder, but every time I train, it will re-download a file called glove.6B.200d. Please help me, thank you! I'm not sure. Maybe changing the path of the customized GLOVE_DIR in the command? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Thank you for your prompt reply!Problem solved!
thank you for the share. A question about the visualize code, what is the definition of 'dispaly' in draw_iamge? Thank you!
❓ Questions and Help
Is there code for scene graph visualization after running inference/evaluation?