[python][Original] labelme_json_to_dataset did not generate info.yaml solution

This article is for ubuntu system, if you are windows, you can use everything software to search, the added code is the same

Find json_to_dataset.py

sudo find / -name labelme_json_to_dataset

Open the file gedit /home/fut/miniconda3/lib/python3.8/site-packages/labelme/cli/json_to_dataset.py

 

Add the following code

    import yaml

    logger.warning('info.yaml is being replaced by label_names.txt')
    info = dict(label_names=label_names)
    with open(osp.join(out_dir, 'info.yaml'), 'w') as f:
        yaml.safe_dump(info, f, default_flow_style=False)

import is added to the head

The code can be added above __name__

 

 

Guess you like

Origin blog.csdn.net/FL1623863129/article/details/112317861