Skip to content

Commit 310a58d

Browse files
allincowellelisno
andauthored
Add Spurious Correlations notebook (#94)
Co-authored-by: Elías Snorrason <[email protected]>
1 parent 90ee4b7 commit 310a58d

File tree

4 files changed

+1009
-0
lines changed

4 files changed

+1009
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ To quickly learn how to run cleanlab on your own data, first check out the [quic
3232
| 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. |
3333
| 23 | [object_detection](object_detection/README.md) | Train Detectron2 object detection model for use with cleanlab. |
3434
| 24 | [semantic segmentation](segmentation/training_ResNeXt50_for_Semantic_Segmentation_on_SYNTHIA.ipynb) | Train ResNeXt semantic segmentation model for use with cleanlab. |
35+
| 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. |
3536

3637

3738
## Instructions
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Instructions
2+
3+
```console
4+
$ pip install -r requirements.txt
5+
```
6+
7+
Change the version of `torch` and `torchvision` if necessary.
8+
9+
Start Jupyter Lab and run the notebook: `detecting_spurious_correlations.ipynb`
10+
11+
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`.

spurious_correlations_datalab/detecting_spurious_correlations.ipynb

+990
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
git+https://github.com/cleanlab/cleanlab.git#egg=cleanlab[all]
2+
cleanvision
3+
torch
4+
torchvision
5+
matplotlib
6+
numpy
7+
datasets

0 commit comments

Comments
 (0)