facebookresearch / vissl

VISSL is FAIR's library of extensible, modular and scalable components for SOTA Self-Supervised Learning with images.
https://vissl.ai
MIT License
3.25k stars 332 forks source link

Linear Evaluation on VOC07 #558

Closed ShramanPramanick closed 2 years ago

ShramanPramanick commented 2 years ago

Hi,

I have installed VISSL using conda pre-built binaries and have successfully trained SimClr on ImageNet following https://vissl.readthedocs.io/en/v0.1.5/getting_started.html. Next, I evaluated the saved model checkpoint on ImageNet Linear Evaluation following https://vissl.readthedocs.io/en/v0.1.5/evaluations/linear_benchmark.html#benchmark-imagenet-1k.

Now, I want to perform linear classification on voc07. However, I am not sure how to register the voc07 dataset in my python interpreter, and what is the expected data format. For Imagenet, I followed the following steps:

>>> json_data = {
        "imagenet1k_folder": {
            "train": ["<img_path>", "<lbl_path>"],
            "val": ["<img_path>", "<lbl_path>"]
        }
    }
>>> from vissl.utils.io import save_file
>>> save_file(json_data, "/tmp/configs/config/dataset_catalog.json")
>>> from vissl.data.dataset_catalog import VisslDatasetCatalog
>>> print(VisslDatasetCatalog.list())
['imagenet1k_folder']
>>> print(VisslDatasetCatalog.get("imagenet1k_folder"))
{'train': ['<img_path>', '<lbl_path>'], 'val': ['<img_path>', '<lbl_path>']}

What will be the commands for registering voc07?

ShramanPramanick commented 2 years ago

I found it - https://github.com/facebookresearch/vissl/blob/main/configs/config/dataset_catalog.json Thanks.