ikaankeskin commited on
Commit
ba37ef7
·
1 Parent(s): 3450062

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -4
README.md CHANGED
@@ -1,5 +1,47 @@
1
- ---
2
- license: mit
3
- ---
4
 
5
- Run Notebook to download and extract the VOC2012 data or download and extract it manually from this link: https://huggingface.co/datasets/ikaankeskin/PASCAL_MLX/resolve/main/VOC2012.zip
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # **VOC2012 Image and Annotation Visualization** Notebook
 
 
2
 
3
+ **Github**: https://github.com/ikaankeskin/MLXdatasets/tree/main/ObjectDetection/PASCAL
4
+
5
+ **HuggingFace**: https://huggingface.co/datasets/ikaankeskin/PASCAL_MLX
6
+
7
+ This repository contains a tool that facilitates the download, extraction, and visualization of the VOC2012 dataset, complete with bounding box annotations extracted from associated XML files.
8
+
9
+ ## **Features**
10
+
11
+ - **Automated Dataset Download**: Fetches the VOC2012 dataset from Hugging Face's repository in ZIP format.
12
+ - **ZIP Extraction**: Conveniently unzips the downloaded dataset to provide access to images and their annotations.
13
+ - **Image Visualization**: Displays a select set of images from the dataset for preliminary visualization.
14
+ - **XML Annotation Processing**: Reads corresponding XML annotation files for chosen images.
15
+ - **Bounding Box Overlay**: Draws bounding boxes around annotated objects on the images, enhancing visualization.
16
+ - **Annotation Table Display**: Offers a structured view of extracted details from XML annotations in tabular format.
17
+
18
+ ## **Requirements**
19
+
20
+ ```css
21
+ cssCopy code
22
+ python [your_script_name].py
23
+
24
+ ```
25
+
26
+ - **Python**: Version 3.x
27
+ - **Libraries**: As specified in **`requirements.txt`**, which includes:
28
+ - requests
29
+ - tqdm
30
+ - pandas
31
+ - matplotlib
32
+ - opencv-python
33
+
34
+ ## **Object Filters for Visualizations**
35
+
36
+ The tool comes equipped with a specific color mapping that governs the visual representation of certain objects when overlaying bounding box annotations on images. The current mapping is coded as:
37
+
38
+ ```python
39
+ color_mapping = {'train': (0, 255, 0), 'person': (0, 0, 255)}
40
+ ```
41
+
42
+ This implies:
43
+
44
+ - 'train' objects are rendered with **green** bounding boxes (RGB: **`(0, 255, 0)`**).
45
+ - 'person' objects are visualized with **blue** bounding boxes (RGB: **`(0, 0, 255)`**).
46
+
47
+ Objects not included in this mapping will not receive bounding boxes during visualization. For incorporating additional object types or altering existing color configurations, users can edit or extend the **`color_mapping`** dictionary. For instance, to visualize 'car' objects in red, an entry **`'car': (255, 0, 0)`** can be added.