From 660f1ac1dfe5e81ed80a294a08983147a5e45fe1 Mon Sep 17 00:00:00 2001 From: Amin Ghiasi Date: Sat, 22 Jan 2022 20:32:03 -0500 Subject: [PATCH] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index aba5d86..99aa3be 100644 --- a/README.md +++ b/README.md @@ -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') ```