ChenRocks/UNITER

AttributeError: 'DetectFeatLmdb' object has no attribute 'env'

FightingFighting opened this issue · 5 comments

when I run python train_re.py --config config/train-refcoco-base-1gpu.json --output_dir $RE_EXP

I just get this result.

03/11/2021 11:44:06 - INFO - main - Loading Train Dataset /txt_db/refcoco_train.db, /img_db/re_coco_gt
/img_db/re_coco_gt
/txt_db/refcoco_train.db
Traceback (most recent call last):
File "train_re.py", line 461, in
main(args)
File "train_re.py", line 129, in main
ReDataset, re_collate, opts)
File "train_re.py", line 46, in create_dataloader
num_bb, opts.compressed_db)
File "/src/data/data.py", line 75, in init
readahead=not _check_distributed())
lmdb.Error: /img_db/re_coco_gt/feat_numbb100: No such file or directory
Exception ignored in: <bound method DetectFeatLmdb.del of <data.data.DetectFeatLmdb object at 0x7f165ddb5940>>
Traceback (most recent call last):
File "/src/data/data.py", line 98, in del
self.env.close()
AttributeError: 'DetectFeatLmdb' object has no attribute 'env'

Does anyone know this?

when I run python train_re.py --config config/train-refcoco-base-1gpu.json --output_dir $RE_EXP

I just get this result.

03/11/2021 11:44:06 - INFO - main - Loading Train Dataset /txt_db/refcoco_train.db, /img_db/re_coco_gt
/img_db/re_coco_gt
/txt_db/refcoco_train.db
Traceback (most recent call last):
File "train_re.py", line 461, in
main(args)
File "train_re.py", line 129, in main
ReDataset, re_collate, opts)
File "train_re.py", line 46, in create_dataloader
num_bb, opts.compressed_db)
File "/src/data/data.py", line 75, in init
readahead=not _check_distributed())
lmdb.Error: /img_db/re_coco_gt/feat_numbb100: No such file or directory
Exception ignored in: <bound method DetectFeatLmdb.del of <data.data.DetectFeatLmdb object at 0x7f165ddb5940>>
Traceback (most recent call last):
File "/src/data/data.py", line 98, in del
self.env.close()
AttributeError: 'DetectFeatLmdb' object has no attribute 'env'

Does anyone know this?

I also meet this issue, do you solve this problem?

I am getting the same error.
Were you able to solve this?
@wangxiao5791509
@FightingFighting

@shivangibithel I changed to follow Oscar and VINVL model for vision-language pretraining.

@shivangibithel this problem is because the failure to read the lmdb file, you can try to read lmdb file at first.

note that "lmdb.Error: /img_db/re_coco_gt/feat_numbb100: No such file or directory" in your error message. You are supposed to change your directory in /config/train-refcoco-base-1gpu.json if your command parament is that config file