#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include "ansjer_ai_cfg.h"

int main()
{
	char *filename = (char *)"yolo_config.json";
	Asj_Ai_Cfg_t *ai_config; 
	ai_config = (Asj_Ai_Cfg_t *)malloc(sizeof(Asj_Ai_Cfg_t));
	memset(ai_config, 0, sizeof(Asj_Ai_Cfg_t));
	read_Asj_Ai_Json(ai_config,filename);
	// std::cout << "ezbStr:" << ai_config->property.ezbStr << std::endl;

	// std::cout << "binStr:" << ai_config->property.binStr << std::endl;
	std::cout << "---------anchors_start------" << std::endl;
	for (int i = 0; i < 18; i++)
		// std::cout << ai_config->property.anchors[i] << std::endl;
	std::cout << "---------anchors_end------" << std::endl;

	std::cout << "---------label_start------" << std::endl;
	for (int i = 0; i <ai_config->property.label.size() ; i++)
		std::cout << ai_config->property.label[i] << std::endl;
	std::cout << "---------label_end------" << std::endl;

	std::cout << "---------yolo_outputs_name------" << std::endl;
	for (int i = 0; i <ai_config->property.yolo_outputs_name.size() ; i++)
		std::cout << ai_config->property.yolo_outputs_name[i] << std::endl;
	std::cout << "---------yolo_outputs_name_end------" << std::endl;


	std::cout << "need_nu_freq:" << ai_config->property.need_nu_freq << std::endl;
	std::cout << "need_vu_freq:" << ai_config->property.need_vu_freq << std::endl;
	std::cout << "freq_nu:" << ai_config->property.freq_nu << std::endl;
	std::cout << "freq_vu:" << ai_config->property.freq_vu << std::endl;
	
	std::cout << "iou_thresh:" << ai_config->class_attrs_all.iou_thresh << std::endl;
	std::cout << "conf_thresh:" << ai_config->class_attrs_all.conf_thresh << std::endl;

	return 0;
}

