COCO Dataset Analysis for Object Detection

The analysis includes the statistical values and histogram of frame width and height, histogram of the pixel contrast, and scatter chart of the center points of the horizontal and vertical coordinates. Detailed analysis items are described as follows:

  1. Statistics on anchor and overlap
  2. Histogram of the width, height, aspect ratio, area, and center points of the horizontal and vertical coordinates
  3. Histogram of the average values of hue, saturation, and luminance, and histogram of contrast
  4. Scatter chart of the center points of the horizontal and vertical coordinates

You can run the dataset_analysis.py script to analyze the dataset. The following describes how to use the parameters.

Table 1 Parameter description

Parameter

Type

Value Range

Default Value

Description

coco_root

String

-

./split_dataset_coco_feature/train

Path of the COCO dataset.

json_file

String

-

instances_annotations.json

Annotations file in the COCO dataset.

result_path

String

-

./result

Path for saving the analysis results.

The command reference for data_analysis is as follows:
python3 com_package/object_detection/data_analysis/dataset_analysis.py --coco_root='com_package/object_detection/data_analysis/split_dataset_coco_feature/train' --json_file=instances_annotations.json --result_path='./result'

The reference log information is as follows:

Figure 1 Log information

After the script is executed, the labeling analysis results are generated in the output directory specified by --result.

Figure 2 Analysis results