|
@@ -1,11 +1,12 @@
|
|
-#!/usr/bin/env python
|
|
|
|
-
|
|
|
|
import argparse
|
|
import argparse
|
|
import json
|
|
import json
|
|
import os
|
|
import os
|
|
import os.path as osp
|
|
import os.path as osp
|
|
import warnings
|
|
import warnings
|
|
|
|
|
|
|
|
+import matplotlib
|
|
|
|
+matplotlib.use('Agg')
|
|
|
|
+
|
|
import numpy as np
|
|
import numpy as np
|
|
import PIL.Image
|
|
import PIL.Image
|
|
import yaml
|
|
import yaml
|
|
@@ -15,8 +16,8 @@ from labelme import utils
|
|
|
|
|
|
def main():
|
|
def main():
|
|
warnings.warn("This script is aimed to demonstrate how to convert the\n"
|
|
warnings.warn("This script is aimed to demonstrate how to convert the\n"
|
|
- "JSON file to a single image dataset, and not to handle\n"
|
|
|
|
- "multiple JSON files to generate a real-use dataset.")
|
|
|
|
|
|
+ "JSON file to a single image dataset, and not to handle\n"
|
|
|
|
+ "multiple JSON files to generate a real-use dataset.")
|
|
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('json_file')
|
|
parser.add_argument('json_file')
|