Skip to content

ADMAntwerp/ImageCounterfactualExplanations

Repository files navigation

Image Counterfactual Generator

How to use it

This package was tested using Python 3.7

Install Requirements

pip install -r requirements.txt

Using MobileNetV2 Model

To generate a targeted counterfactual for the MobileNetV2 model, you can use the script gen_t2_mnv2, which has the mandatory fields described below:

python gen_t2_mnv2.py --data  ./chihuahua_test/ --output ./cf_region_test  --cclass "French bulldog"

Base arguments description:

Additional arguments:

  • --jobs - Number of jobs to run the experiment (DEFAULT = 1)
  • --mode - Type of replacement of segmented images, options are: mean, blur, random or inpaint (DEFAULT = blur)
  • --timeout - Maximum time allowed to generate a counterfactual (DEFAULT = 60)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published