Created
September 5, 2022 09:11
-
-
Save tamnguyenvan/092c478e1cc58da284199ad0b9393ca7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| categories = [ | |
| 'unuse0', | |
| 'unuse1', | |
| '1 line dark', | |
| '2 lines dark', | |
| '1 line light', | |
| '2 lines light', | |
| 'unuse6', | |
| 'unuse7', | |
| 'unuse8', | |
| 'unuse9', | |
| 'unuse10', | |
| ] | |
| filename = f'coco{len(categories)}_label_map.pbtxt' | |
| with open(filename, 'wt') as f: | |
| for i, cat in enumerate(categories): | |
| f.write('item\n{' + f'\tid:{i+1}\n\tname: "{cat}"\n' + '}\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment