## Data [will be released]
      
    - inside the arhive you have the following folders 
        - splits - dataset splits for DomainNet, fMoW, COCOShift_balanced, COCOShift75 and COCOShift95
        - embeddings - precomputed embeddings (CLIP and ResNet-18) for all sets 
        
    - make sure the paths in configs.py are correct ( embeddings_main_path and metadata_main_path )
      
## Installation 

    - create environment from requirements.txt 
        conda create --name stylist --file requirements.txt
    - activate environment 
    - install skfeature-chappers
        pip install faiss-gpu
        pip install skfeature-chappers
        
## Usage 

Step 1 - Feature ranking in training environments 

    - run step1_feature_ranking.py 
            - example:
                python step1_feature_ranking.py COCOShift95 resnet18 Stylist ./results/ranking_methods
                - will run Step1, for dataset COCOShift95, using ResNet-18 features, and Stylist ranking method 
                - the results will be saved in ./results/ranking_methods 

            - available datasets: FMoW, DomainNet, COCOShift_balanced, COOCShift75, COCOShift90, COCOShift95 
            - available embeddings: clip, resnet18  
            - available methods: Stylist, random, PCA_loadings, InfoGain, FisherScore, MAD, Dispersion, Variance

Step 2 - Features selection for Robust Novelty Detection 

    - run step2_features_selection_for_ND.py 
            - example:
                python step2_features_selection_for_ND.py COCOShift95 resnet18 Stylist kNN ./results/ranking_methods ./results/nd_methods
                - will run Step2, for dataset COCOShift95, using ResNet-18 features, and Stylist ranking method 
                - the ND method is kNN 
                - features ranking produced in Step1 will be read from ./results/ranking_methods 
                - the results will be saved in ./results/nd_methods

            - available ND methods: kNN 