Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AminJun authored Jan 23, 2022
1 parent c41380f commit 660f1ac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ For some experiments, you might wanna pass only the `background` of imagenet ima
# Restarting from the scratch
Downloading:
First download the data from [https://image-net.org/data/bboxes_annotations.tar.gz](here):
```
```bash
wget "https://image-net.org/data/bboxes_annotations.tar.gz"
```

Extract the File:
```
```bash
tar -xvf bboxes_annotations.tar.gz
```

Extract every subfolder:
```
```bash
cd bboxes_annotations
ls | grep .tar.gz | while read f ; do tar -xvf "${f}" ; done
```

Convert dataset to JS:
```
```bash
python read_xml.py
```

Clean the extra 50GB extracted files:
```
```bash
rm *.tar.gz
ls | grep "n.*" | while read f ; do rm -rf "${f}" ; done
```

Get Indices that have bounding boxes:
```
```bash
python get_indices.py
```

Then simply use pass the files `boxes.pt` and `indices.pt` to your `BackgroundForegroundImageNet` constructor
```
```python
dataset = BackgroundForegroundImageNet(root='.', download=False, boxes='boxes.pt', indices='indices.pt')
```

0 comments on commit 660f1ac

Please sign in to comment.