File size: 151 Bytes
259aca6
 
 
 
 
 
 
1
2
3
4
5
6
7
import json

# simple example
id2label = {1: 'tree0', 2: 'tree1', 3:'tree3' }

with open('trees_id2label.json', 'w') as fp:
    json.dump(id2label, fp)