def get_imagenamge_by_label(input_path):
    data_paths = [os.path.join(input_path, s) for s in ['train_data-2018-3-7']]
    for data_path in data_paths:
        annot_path = os.path.join(data_path, 'Annotations')
        annots = [os.path.join(annot_path, s) for s in os.listdir(annot_path)]
        for annot in annots:
            try:
                et = ET.parse(annot)
                element = et.getroot()
                element_objs = element.findall('object')
                for element_obj in element_objs:
                    node = element_obj.find('name')
                    class_name = element_obj.find('name').text
                    if (class_name == 'qdpj-qdpj-gz-yw-330ml'):
                        print(annot)
            except Exception as ex:
                print(ex)
def get_imagenamge_by_label(input_path):
    data_paths = [os.path.join(input_path, s) for s in ['train_data-2018-3-7']]
    for data_path in data_paths:
        annot_path = os.path.join(data_path, 'Annotations')
        annots = [os.path.join(annot_path, s) for s in os.listdir(annot_path)]
        for annot in annots:
            try:
                et = ET.parse(annot)
                element = et.getroot()
                element_objs = element.findall('object')
                for element_obj in element_objs:
                    node = element_obj.find('name')
                    class_name = element_obj.find('name').text
                    if (class_name == 'qdpj-qdpj-gz-yw-330ml'):
                        print(annot)
            except Exception as ex:
                print(ex)