Notice: The current streetview model need both label map and instance map as input, since the original pytorch model was trained with both maps as input.
Standard shape of 2 maps: (1, 1024, 2048, 1) grayscale, in the format B, H, W, C
If input shape is not matched, it will be reshaped to : (1, 1024, 2048, 1)
(Images from https://www.cityscapes-dataset.com/)
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample image,
$ python3 pix2pixhd.py
If you want to specify the input label map and instance map, put the label image path and instance image map after the --input
and --instance_map
options respectively.
You can use --savepath
option to change the name of the output file to save.
$ python3 pix2pixhd.py --input IMAGE_PATH --instance_map INSTANCE_PATH --savepath SAVE_IMAGE_PATH
PyTorch
ONNX opset=11