Open Zhangwt100 opened 1 year ago
You can download it from this link and modify its name to em_E.pk.
I met the similar problem that:
[Errno 2] No such file or directory: '/data4/hlf_code/IETrans/IETrans-SGG.pytorch/exps/50/transformer/predcls/lt/external/relabel/em_E.pk'
And I did as what you said, but got this:
/data4/hlf_code/IETrans/IETrans-SGG.pytorch/exps/50/transformer/predcls/lt/external/relabel/em_E.pk
/data4/hlf_code/IETrans/IETrans-SGG.pytorch/exps/50/transformer/predcls/lt/internal/relabel/em_E.pk_topk_0.7
intra 57723 315642
0%| | 0/58550 [00:00<?, ?it/s]
Traceback (most recent call last):
File "combine.py", line 100, in <module>
tmp = ex_data_to_in_data(ex_data, img_infos)
File "combine.py", line 68, in ex_data_to_in_data
complete_relatinos(ex_data)
File "combine.py", line 51, in complete_relatinos
assert "rel_logits" in data, data
AssertionError: {'img_path': 'datasets/vg/VG_100K/99.jpg', 'boxes': array([[224.375, 40. , 392.5 , 344.375],
[408.125, 273.125, 636.25 , 447.5 ],
[546.875, 285.625, 638.125, 476.875],
[196.875, 28.75 , 236.875, 345. ],
[422.5 , 0. , 637.5 , 343.125],
[420.625, 11.875, 500.625, 341.25 ],
[253.75 , 220.625, 290. , 303.125],
[257.5 , 351.875, 288.75 , 425. ],
[232.5 , 346.875, 260. , 425. ]], dtype=float32), 'labels': array([ 38, 126, 108, 38, 22, 22, 108, 54, 54]), 'possible_rels': [[5, 29, 30, 31, 50], [6, 20], [22, 23, 29], [22, 23, 29], [4, 6, 8, 29, 31], [5, 29, 30, 31, 50], [8, 29, 31], [4, 7, 8, 10, 20, 22, 23, 29, 30, 31, 32], [8, 29, 31], [4, 7, 8, 10, 20, 22, 23, 29, 30, 31, 32], [8, 9, 22, 29, 30, 31, 48, 50], [8, 9, 22, 29, 30, 31, 48, 50]], 'width': 640, 'height': 480, 'relations': array([[2, 1, 6]])}
Should these two files be produced in the former two steps?
bash cmds/50/transformer/predcls/lt/internal/relabel.sh
bash cmds/50/transformer/predcls/lt/external/relabel.sh
I got no .pk file generated after run the two scripts, here are my env file lists:
Yes, the em_E.pk will be generated respectively in internal/relabel
and external/relabel
, after you run:
bash cmds/50/transformer/predcls/lt/internal/relabel.sh
bash cmds/50/transformer/predcls/lt/external/relabel.sh
The .pk file I provide combines the .pk files in internal/relabel
and external/relabel
, which are the result of python combine.py
.
If you download it, you are not required to run combine.py again. You can directly use it for the next step training.
Do you have any problem when running:
bash cmds/50/transformer/predcls/lt/internal/relabel.sh
bash cmds/50/transformer/predcls/lt/external/relabel.sh
Yes, I have problem in running these two commands:
bash cmds/50/transformer/predcls/lt/internal/relabel.sh bash cmds/50/transformer/predcls/lt/external/relabel.sh
As I said, I ran the two commands, the commands didn't report error, finish correctly, but no .pk files generated. The file list is shown above.
For checking, I paste the end of the log for external:
We are appreciate that you provide the .pk files for motif exp, however, we want to use transformer to reproduce the pipeline. Hope we can get everything right without downloading externally provided files.
By the way, the .pk file you provided is generated by motif model, can transformer commands use this .pk file, too?
Looking forward to your reply, thanks. :)
I am recently busy with another paper. Sorry for the late reply. Yes, Transformer can generate the .pk file. It seems like the log does not report any errors. The command will first generate a raw_em_E.pk
, and then post-process the raw_em_E.pk
to generate the final em_E.pk
.
You can first see whether there is a raw_em_E.pk generated. If it is convenient, you can also show a screenshot of the files of your OUTPUT_DIR.
If the raw_em_E.pk can be generated, I guess maybe the post-process failed. You can try the post-process code manually to see that are there any bugs.
I tackled this problem by use two gpus to run the script.
FileNotFoundError: [Errno 2] No such file or directory: '/root/exps/50/motif/predcls/lt/combine/rwt/em_E.pk'
how to solve this problem?