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

Spurious correlations Blogpost notebook #94

Merged
merged 6 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ To quickly learn how to run cleanlab on your own data, first check out the [quic
| 22 | [non_iid_detection](non_iid_detection/non_iid_detection.ipynb) | Use Datalab to detect non-IID sampling (e.g. drift) in datasets based on numeric features or embeddings. |
| 23 | [object_detection](object_detection/README.md) | Train Detectron2 object detection model for use with cleanlab. |
| 24 | [semantic segmentation](segmentation/training_ResNeXt50_for_Semantic_Segmentation_on_SYNTHIA.ipynb) | Train ResNeXt semantic segmentation model for use with cleanlab. |
| 24 | [spurious correlations](spurious_correlations_datalab/detecting_spurious_correlations.ipynb) | Train a CNN model on spurious and non-spurious versions of a subset of [Food-101](https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/) dataset. Use `Datalab` to detect issues in the spuriously correlated datasets. |


## Instructions
Expand Down
11 changes: 11 additions & 0 deletions spurious_correlations_datalab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Instructions

```console
$ pip install -r requirements.txt
```

Change the version of `torch` and `torchvision` if necessary.

Start Jupyter Lab and run the notebook: `detecting_spurious_correlations.ipynb`

In this tutorial, we demonstrate the impact of training a model on a dataset with spurious correlations, focusing on a scenario where one class consists predominantly of dark images. We then compare the model's performance on a dataset free from such spurious correlations. Finally, the tutorial shows how these spurious correlation issues can be easily detected using `Datalab`.
990 changes: 990 additions & 0 deletions spurious_correlations_datalab/detecting_spurious_correlations.ipynb

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions spurious_correlations_datalab/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
git+https://github.com/cleanlab/cleanlab.git#egg=cleanlab[all]
cleanvision
torch
torchvision
matplotlib
numpy
datasets
Loading