in the "ONNXLive Tutorial" it is stated that the downloaded models can be added to the Xcode project and then being used for style transfer. However, when using these models, no changes of the captured images are visible. Downloading another network from https://github.com/kirualex/NSTDemo/blob/master/NSTDemo/StarryNight.mlmodel and using that network demonstrates that the app work correctly and style transfer is visible.
What I found so far:
The input/output shapes might be related. For the working network they are Image (Color 720 x 720). For the network from the tutorial the input is MultiArray (Float32 3 x 540 x 250) while the output is Image (Color 252 x 540).
P.S. I should mention that the models by themselves seem to be ok. When I evaluate the pth models using the neural_style.py eval mentioned in the tutorial, the output looks as expected.
Hi,
in the "ONNXLive Tutorial" it is stated that the downloaded models can be added to the Xcode project and then being used for style transfer. However, when using these models, no changes of the captured images are visible. Downloading another network from https://github.com/kirualex/NSTDemo/blob/master/NSTDemo/StarryNight.mlmodel and using that network demonstrates that the app work correctly and style transfer is visible.
What I found so far:
The input/output shapes might be related. For the working network they are
Image (Color 720 x 720)
. For the network from the tutorial the input isMultiArray (Float32 3 x 540 x 250)
while the output isImage (Color 252 x 540)
.I already applied the fix suggested https://github.com/onnx/tutorials/issues/89 with respect to the wrong output name.
I read a lot about problems when using pytorch 1.0 with onnx-coreml, e.g. https://github.com/onnx/onnx-coreml/issues/365, but am not sure if this is related.
I verified that the same problem occurs when I train my own models as described in the tutorial instead of using the downloaded models.
My setting
pytorch 1.0.1 onnx-coreml 0.4.0 onnx 1.4.1
Does anybody have an idea how to approach this problem?
Thanks, Thorsten