leekwoon commited on
Commit
4491651
·
verified ·
1 Parent(s): 96d7907

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +129 -0
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ImageNet 2012 Dataset Backup
2
+
3
+ Complete backup of the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) 2012 dataset.
4
+
5
+ ## Download & Extract
6
+
7
+ ```bash
8
+ # huggingface_hub 설치 (필요시)
9
+ pip install huggingface_hub
10
+
11
+ # 다운로드
12
+ huggingface-cli download leekwoon/imagenet_dataset_backup --repo-type dataset --local-dir ./imagenet_data
13
+
14
+ # 무결성 확인 (선택사항)
15
+ cd imagenet_data
16
+ md5sum -c checksums.md5
17
+
18
+ # 파일 합치기 및 압축 해제
19
+ cat data.tar.gz.part_* | tar -xzvf -
20
+ ```
21
+
22
+ ## Dataset Information
23
+
24
+ ### Overview
25
+ ImageNet is a large-scale hierarchical image database that has been instrumental in advancing deep learning and computer vision research. The ILSVRC 2012 subset is the most commonly used benchmark for image classification tasks.
26
+
27
+ ### Statistics
28
+ - **Training Images**: 1,281,167
29
+ - **Validation Images**: 50,000
30
+ - **Test Images**: 100,000
31
+ - **Number of Classes**: 1,000
32
+ - **Image Format**: JPEG
33
+ - **Average Resolution**: ~469x387 pixels
34
+
35
+ ## Directory Structure
36
+
37
+ ```
38
+ imagenet2012/
39
+ ├── train/ # Training images
40
+ │ ├── n01440764/ # Class folder (tench)
41
+ │ ├── n01443537/ # Class folder (goldfish)
42
+ │ ├── n01484850/ # Class folder (great white shark)
43
+ │ └── ... # 997 more class folders
44
+ ├── val/ # Validation images
45
+ │ ├── n01440764/
46
+ │ ├── n01443537/
47
+ │ ├── n01484850/
48
+ │ └── ...
49
+ └── test/ # Test images (if available)
50
+ └── ...
51
+ ```
52
+
53
+ ## Class Information
54
+
55
+ The dataset contains 1,000 object classes from the WordNet hierarchy, including:
56
+ - Animals (mammals, birds, fish, reptiles, etc.)
57
+ - Plants (trees, flowers, fruits, vegetables)
58
+ - Objects (vehicles, furniture, tools, instruments)
59
+ - Scenes and structures
60
+
61
+ Each class is identified by a WordNet ID (synset), such as:
62
+ - n01440764: tench (a type of fish)
63
+ - n02119789: kit fox
64
+ - n07734744: mushroom
65
+ - n04515003: upright piano
66
+
67
+ ## Usage
68
+
69
+ ### Loading with PyTorch
70
+ ```python
71
+ from torchvision import datasets, transforms
72
+
73
+ transform = transforms.Compose([
74
+ transforms.Resize(256),
75
+ transforms.CenterCrop(224),
76
+ transforms.ToTensor(),
77
+ transforms.Normalize(mean=[0.485, 0.456, 0.406],
78
+ std=[0.229, 0.224, 0.225]),
79
+ ])
80
+
81
+ # Load training data
82
+ train_dataset = datasets.ImageFolder('imagenet2012/train', transform=transform)
83
+
84
+ # Load validation data
85
+ val_dataset = datasets.ImageFolder('imagenet2012/val', transform=transform)
86
+ ```
87
+
88
+ ### Loading with TensorFlow
89
+ ```python
90
+ import tensorflow as tf
91
+
92
+ def preprocess_image(image):
93
+ image = tf.image.resize(image, [224, 224])
94
+ image = tf.keras.applications.imagenet_utils.preprocess_input(image)
95
+ return image
96
+
97
+ # Load dataset
98
+ train_ds = tf.keras.preprocessing.image_dataset_from_directory(
99
+ 'imagenet2012/train',
100
+ image_size=(224, 224),
101
+ batch_size=32
102
+ )
103
+ ```
104
+
105
+ ## Important Notes
106
+
107
+ - This dataset is for research purposes only
108
+ - The original ImageNet dataset requires accepting the terms of use
109
+ - Some images may be missing due to broken URLs in the original dataset
110
+ - Class labels follow the ILSVRC 2012 convention
111
+
112
+ ## Citation
113
+
114
+ If you use this dataset, please cite the original ImageNet paper:
115
+
116
+ ```bibtex
117
+ @article{deng2009imagenet,
118
+ title={ImageNet: A large-scale hierarchical image database},
119
+ author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li},
120
+ journal={2009 IEEE Conference on Computer Vision and Pattern Recognition},
121
+ pages={248--255},
122
+ year={2009},
123
+ organization={IEEE}
124
+ }
125
+ ```
126
+
127
+ ## License
128
+
129
+ The annotations in this dataset are licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). The images have various licenses that should be checked on the original ImageNet website.