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

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

Open
FightingFighting opened this issue Mar 11, 2021 · 5 comments
Open

Comments

@FightingFighting
Copy link

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?

@wangxiao5791509
Copy link

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?

@shivangibithel
Copy link

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

@wangxiao5791509
Copy link

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

@FightingFighting
Copy link
Author

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

@LongxingHu
Copy link

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

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

4 participants