mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 13:10:12 +08:00
Merge pull request #17469 from l-bat:fix_virtual_try_on
This commit is contained in:
commit
08d1c54364
@ -806,6 +806,10 @@ void ONNXImporter::populateNet(Net dstNet)
|
|||||||
{
|
{
|
||||||
layerParams.type = "ELU";
|
layerParams.type = "ELU";
|
||||||
}
|
}
|
||||||
|
else if (layer_type == "Tanh")
|
||||||
|
{
|
||||||
|
layerParams.type = "TanH";
|
||||||
|
}
|
||||||
else if (layer_type == "PRelu")
|
else if (layer_type == "PRelu")
|
||||||
{
|
{
|
||||||
layerParams.type = "PReLU";
|
layerParams.type = "PReLU";
|
||||||
|
@ -185,7 +185,7 @@ class CpVton(object):
|
|||||||
|
|
||||||
agnostic = np.concatenate((res_shape, img_head, pose_map), axis=0)
|
agnostic = np.concatenate((res_shape, img_head, pose_map), axis=0)
|
||||||
agnostic = np.expand_dims(agnostic, axis=0)
|
agnostic = np.expand_dims(agnostic, axis=0)
|
||||||
return agnostic
|
return agnostic.astype(np.float32)
|
||||||
|
|
||||||
def get_warped_cloth(self, cloth_img, agnostic, height=256, width=192):
|
def get_warped_cloth(self, cloth_img, agnostic, height=256, width=192):
|
||||||
cloth = cv.dnn.blobFromImage(cloth_img, 1.0 / 127.5, (width, height), mean=(127.5, 127.5, 127.5), swapRB=True)
|
cloth = cv.dnn.blobFromImage(cloth_img, 1.0 / 127.5, (width, height), mean=(127.5, 127.5, 127.5), swapRB=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user