Closed aggiejiang closed 4 years ago
Hi,
Can you provide more details on how you constructed this new HM dataset? I don't see an image with id: 670482 in original images.
the image with id 670482 is generated by the image with id 67048 in original images, by adding something new (like Gaussian noise, etc.
Then, you will have to generate a new lmdb which also has features for this image that you generated. Also, since the image has changed, you will have to generate new features for this image using https://github.com/facebookresearch/mmf/blob/master/tools/scripts/features/extract_features_vmb.py. This script will generate npy features for your image. Then you can convert all npy features in a folder into an lmdb using https://github.com/facebookresearch/mmf/blob/master/tools/scripts/features/lmdb_conversion.py
Ok I see. So one more general question -- does this mean every time I need to use this script to generate and convert features if I want to use a new dataset for models?
It depends on the model you are using. VisualBERT/ViLBERT work on feature level so you need to generate the features. MMBT works on image level so you can directly use it with images.
ok. Bert-based model is what I want to use. Thanks for your explanation!!
Follow these steps:
I follow this step but meet an error KeyError: 'Non-existent config key: MODEL.BACKBONE.OUT_CHANNELS
, which seems the same as #113.
For maskrcnn, I install torch 1.4.0 and torchvision 0.5.0 by pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html
. cuda version is 10.1
Is anything wrong during this process?
Are you using the right maskrcnn_benchmark installation as specified in https://github.com/facebookresearch/mmf/blob/master/tools/scripts/features/extract_features_vmb.py#L3
yes. I follow the install file for maskrcnn. But I install pytorch and torchvision by using
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu101/torch_nightly.html`
instead of
# follow PyTorch installation in https://pytorch.org/get-started/locally/
# we give the instructions for CUDA 9.0
conda install pytorch-nightly -c pytorch
# install torchvision
cd ~/github
git clone https://github.com/pytorch/vision.git
cd vision
python setup.py install
other steps are all the same with the instruction.
I meant you are not using the right maskrcnn_benchmark repo. It should be https://gitlab.com/vedanuj/vqa-maskrcnn-benchmark. The error you are seeing is because you are using actual maskrcnn-benchmark
.
Also, any particular reason you are using nightly build?
nightly build requires python<3.8 but I use python 3.8.2 before. I change the version back to 3.7 and it seems ok to run. thanks for your tips!
Should I open a new issue for other errors? ('Segmentation fault' but the environment with enough memory)
Yes, please open up a new issue. We like to keep issues self-contained.
Follow these steps:
- Create a new conda environment
- Install MMF first in this environment
- Then install maskrcnn, MMF will work with these version of torch and torchvision, but MaskRCNN won't work with higher versions of torch and torchvision.
- Extract features, move back to your original env, create an LMDB.
- Update experiment configurations to point to new LMDBs
- Profit!
here has a queation about how to create lmdb file,would you please answer us?
❓ Questions and Help
I have a new hateful memes dataset based on old hateful memes dataset, both with the same data format and file name.
I put new files to the directory where
mmf_convert_hm
put files to. When I run the model as the tutorial said, I met problem likeI am not sure what causes this KeyError, the dataset not achieving one-to-one mapping or it requiring to re-generate features. Could you please suggest one solution for me. Thank you!