!rm -rf /content/FastPhotoStyle/segmentation
!git clone https://github.com/mingyuliutw/semantic-segmentation-pytorch /content/FastPhotoStyle/segmentation
!cd /content/FastPhotoStyle/segmentation/ && sh ./demo_test.sh
if not ':/content/FastPhotoStyle/segmentation' in os.environ['PYTHONPATH']:
os.environ['PYTHONPATH'] += ':/content/FastPhotoStyle/segmentation'
!mkdir /content/FastPhotoStyle/images -p && mkdir /content/FastPhotoStyle/results -p;
!rm /content/FastPhotoStyle/images/content3.png -rf;
!rm /content/FastPhotoStyle/images/style3.png -rf;
!rm /content/FastPhotoStyle/results/ -rf
!curl -o /content/FastPhotoStyle/images/content3.png '{content}'
!curl -o /content/FastPhotoStyle/images/style3.png '{style}'
!cd /content/FastPhotoStyle/ && python ./demo_with_ade20k_ssn.py --output_visualization
Cloning into '/content/FastPhotoStyle/segmentation'...
remote: Counting objects: 521, done.
remote: Total 521 (delta 0), reused 0 (delta 0), pack-reused 521
Receiving objects: 100% (521/521), 3.92 MiB | 3.10 MiB/s, done.
Resolving deltas: 100% (293/293), done.
wget: /usr/local/lib/libcrypto.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
Redirecting output to ‘wget-log’.
wget: /usr/local/lib/libcrypto.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
Redirecting output to ‘wget-log.1’.
wget: /usr/local/lib/libcrypto.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
wget: /usr/local/lib/libssl.so.1.0.0: no version information available (required by wget)
Redirecting output to ‘wget-log.2’.
Namespace(arch_decoder='ppm_bilinear_deepsup', arch_encoder='resnet50_dilated8', batch_size=1, fc_dim=2048, gpu_id=0, imgMaxSize=1000, imgSize=[300, 400, 500, 600], model_path='baseline-resnet50_dilated8-ppm_bilinear_deepsup', num_class=150, num_val=-1, padding_constant=8, result='./', segm_downsampling_rate=8, suffix='_epoch_20.pth', test_img='ADE_val_00001519.jpg')
Loading weights for net_encoder
Loading weights for net_decoder
# samples: 1
/usr/local/lib/python3.6/site-packages/torch/nn/functional.py:1890: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
[2018-09-18 16:17:30] iter 0
Inference done!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 180k 0 180k 0 0 637k 0 --:--:-- --:--:-- --:--:-- 635k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 442k 100 442k 0 0 27.0M 0 --:--:-- --:--:-- --:--:-- 27.0M
Loading weights for net_encoder
Loading weights for net_decoder
/usr/local/lib/python3.6/site-packages/torch/nn/functional.py:1890: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
Resize image: (266,177)->(266,177)
Resize image: (800,452)->(800,452)
Traceback (most recent call last):
File "./demo_with_ade20k_ssn.py", line 133, in <module>
output_visualization=args.output_visualization
File "/content/FastPhotoStyle/process_stylization_ade20k_ssn.py", line 162, in stylization
cont_seg = label_remapping.self_remapping(cont_seg)
File "/content/FastPhotoStyle/process_stylization_ade20k_ssn.py", line 98, in self_remapping
[h,w] = new_seg.shape
ValueError: not enough values to unpack (expected 2, got 1)
I don't think this is a mistake from my side. Any suggestions?