Regarding the resolution of the output image of mlstyletransfer and its channel does not match maskImage

If styletransfer is not performed, the channel obtained through VNGeneratePersonSegmentationRequest() can just match, but if styletransfer is performed, the final effect will be slightly different from the channel, and the resulting picture is 512*512 in resolution.

I try to match the channel of the hand obtained through VNGeneratePersonSegmentationRequest(), so that I can keep what I want, and the background can be replaced, but I tried my own learning package and others' learning package, and found that there is no way to match properly , I don't know where I went wrong, just a little bit off.

You can look at the picture. The picture effect retained by maskImage is a little different from what you expected. If it is a sketch, the effect is very obvious.

My understanding is that the resolution of the image processed by styletransfer is inconsistent with the resolution of the original image. Even if the size is matched, it is a bit biased, but I watched the video demo and the matching is very good. I don't know if my method is wrong? Shouldn't it be handled through channels or what? I hope I can get an answer. I hope I've made it clear. If anyone can answer my doubts, thank you.

Check the picture reference address, I can't upload the picture, the prompt tells me to upload it later. https://kdocs.cn/l/cbYcFau6TFTe

Regarding the resolution of the output image of mlstyletransfer and its channel does not match maskImage
 
 
Q