agolodkov commited on
Commit
68f8659
·
verified ·
1 Parent(s): 821dc53

Fixed README file

Browse files

Expanded the information mentioned in the README file

Files changed (1) hide show
  1. README.md +43 -13
README.md CHANGED
@@ -8,18 +8,48 @@ language:
8
  size_categories:
9
  - 10K<n<100K
10
  ---
11
- ## Description
12
- These scripts generate a dataset for testing and training the orientation classifier.
13
- * The scripts/ folder contains all the necessary scripts
14
- * The src/ folder contains images of document pages. In src/one_column there are single-column documents,
15
- in src/multiple_column there are multi-column documents
16
 
17
- ### About generation scripts:
18
- * scripts/gen_dataset.py - generates an output dataset for model training and testing. It rotates document images and creates a label.csv markup file in each dataset
19
- * "-i", "--input_path_img": source folder absolute path
20
- * "-o", "--output_path_img": absolute path for output folder
21
- * "-l", "--output_path_lbl": absolute path for label file, by deafult it is contained in output folders
22
 
23
- * scripts/get_imgs_from_pdf.py - just to help if you want to add images to the src folder from different pdfs
24
- * "-i", "--input_path_img": source folder absolute path
25
- * "-o", "--output_path_img": absolute path for output folder
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  size_categories:
9
  - 10K<n<100K
10
  ---
 
 
 
 
 
11
 
12
+ ## About dataset
13
+ The main purpose of this dataset is to train and evaluate the model used for defining the orientation of the document and the number of text columns in it. As for the model, we chose EffecientNet B0. We constructed this dataset to represent the variety of documents we usually deal with. It contains open data in the form of scientific papers, legal acts, reports, tables, etc. The languages represented in this dataset are: Russian, English, French, Spanish, Portuguese, Arabic, Armenian, Chinese, Georgian, Greek, Italian, Japanese, Korean, and Mongolian. More specifically, it contains 2426 one-column source documents and 1695 multiple-column source documents. These source files are then rotated at four possible angles to cover all possible orientations (0, 90, 180, and 270 degrees).
 
 
 
14
 
15
+ Formally, document orientation is the angle by which a text document has been rotated relative to its vertical position (the one in which a person can read it). We consider four possible orientations: 0 (vertical position), 90, 180, and 270 degrees.
16
+
17
+ A document is considered a one-column document if most of the text in it is arranged in one column. Similarly, a document is considered a multi-column document if most of the text is divided into two columns.
18
+
19
+ ## Description
20
+ The initial repository structure goes as follows:
21
+ ```
22
+ └─orientation_columns_dataset
23
+ ├─.gitattributes
24
+ ├─README.md
25
+ └─generate_dataset_orient_classifier.zip
26
+ ```
27
+ The structure of the `generate_dataset_orient_classifier.zip` archive after unzipping goes as follows:
28
+ ```
29
+ └─generate_dataset_orient_classifier
30
+ └─src
31
+ ├─one_column
32
+ └─miltiple_column
33
+ ├─README.md
34
+ └─sctipts
35
+ ├─gen_dataset.py
36
+ └─get_imgs_from_pdf.py
37
+ ```
38
+ Folders `one_column` and `miltiple_column` above contain source pictures for the dataset. `one_column` folder contains documents with only one text column, and the `multiple_column` folder contains documents with two columns of text.
39
+ After using the generation scripts `gen_dataset.py` and 'get_imgs_from_pdf.py', you will get the dataset in its final form, which can be used for training and evaluation of the model. The structure of the output dataset folder should look as follows:
40
+ ```
41
+ └─columns_orientation_dataset
42
+ ├─test
43
+ └─train
44
+ ```
45
+ Both the `train` and `test` folders above contain rotated document pictures and files with the name `labels.csv`. These are the dataset markup tables with columns `image_name`,`orientation` and `columns` that represent all the necessary information about the dataset documents. These markup files are generated automatically.
46
+
47
+ ## About generation scripts:
48
+ * `scripts/gen_dataset.py` - generates an output dataset for model training and testing. It rotates document images and creates a `label.csv` markup file in each dataset
49
+ * `-i`, `--input_path_img`: source folder absolute path
50
+ * `-o`, `--output_path_img`: absolute path for output folder
51
+ * `-l`, `--output_path_lbl`: absolute path for label file, by default it is contained in output folders
52
+
53
+ * `scripts/get_imgs_from_pdf.py` - just to help if you want to add images to the src folder from different pdfs
54
+ * `-i`, `--input_path_img`: source folder absolute path
55
+ * `-o`, `--output_path_img`: absolute path for output folder