Compare commits
10
Commits
76317a09a9
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13ea17671a | ||
|
|
be62045645 | ||
|
|
4c0b924487 | ||
|
|
d36a2cf29a | ||
|
|
7ae9ac572e | ||
|
|
af661a370c | ||
|
|
be89fe24cd | ||
|
|
3b0023ab50 | ||
|
|
391254f6db | ||
|
|
1ad04e1967 |
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019 Rajeev Yasarla
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
Binary file not shown.
+2
-2
@@ -592,9 +592,9 @@ class scale_kernel_conf(nn.Module):
|
|||||||
x4=self.conv3(x3)
|
x4=self.conv3(x3)
|
||||||
x4 = self.trans_block4(x4)
|
x4 = self.trans_block4(x4)
|
||||||
#print(x4.size())
|
#print(x4.size())
|
||||||
residual = self.sig(self.conv_refin(self.sig(F.avg_pool2d(x4,16))))
|
residual = self.sig(self.conv_refin(self.sig(F.adaptive_avg_pool2d(x4,(1,1)))))
|
||||||
#print(residual)
|
#print(residual)
|
||||||
residual = F.upsample_nearest(residual, scale_factor=128)
|
residual = F.interpolate(residual, size=x.size()[2:])
|
||||||
#print(residual.size())
|
#print(residual.size())
|
||||||
return residual
|
return residual
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
numpy==1.18.0
|
numpy==1.22.0
|
||||||
opencv-python==4.1.2.30
|
opencv-python>=4.2.0.32
|
||||||
Pillow>=6.2.2
|
Pillow>=6.2.2
|
||||||
six==1.13.0
|
six==1.13.0
|
||||||
torch==0.4.1.post2
|
torch==0.4.1.post2
|
||||||
|
|||||||
+9
-11
@@ -57,7 +57,7 @@ parser.add_argument('--workers', type=int, help='number of data loading workers'
|
|||||||
parser.add_argument('--exp', default='sample', help='folder to output images and model checkpoints')
|
parser.add_argument('--exp', default='sample', help='folder to output images and model checkpoints')
|
||||||
parser.add_argument('--display', type=int, default=5, help='interval for displaying train-logs')
|
parser.add_argument('--display', type=int, default=5, help='interval for displaying train-logs')
|
||||||
parser.add_argument('--evalIter', type=int, default=500, help='interval for evauating(generating) images from valDataroot')
|
parser.add_argument('--evalIter', type=int, default=500, help='interval for evauating(generating) images from valDataroot')
|
||||||
opt = parser.parse_args()
|
opt = parser.parse_args()#pt.originalSize
|
||||||
print(opt)
|
print(opt)
|
||||||
|
|
||||||
|
|
||||||
@@ -253,27 +253,27 @@ for epoch in range(1):
|
|||||||
|
|
||||||
#x_hatcls1,x_hatcls2,x_hatcls3,x_hatcls4,x_lst1,x_lst2,x_lst3,x_lst4 = netG(val_inputv,val_inputv_256,smaps_i,smaps_i64,class1,class2,class3,class4)
|
#x_hatcls1,x_hatcls2,x_hatcls3,x_hatcls4,x_lst1,x_lst2,x_lst3,x_lst4 = netG(val_inputv,val_inputv_256,smaps_i,smaps_i64,class1,class2,class3,class4)
|
||||||
smaps,smaps64 = netS(val_inputv,val_inputv_256)
|
smaps,smaps64 = netS(val_inputv,val_inputv_256)
|
||||||
class1 = torch.zeros([1,1,128,128], dtype=torch.float32)
|
class1 = torch.zeros([1,1,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class1[:,0,:,:] = smaps[:,0,:,:]
|
class1[:,0,:,:] = smaps[:,0,:,:]
|
||||||
class2 = torch.zeros([1,1,128,128], dtype=torch.float32)
|
class2 = torch.zeros([1,1,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class2[:,0,:,:] = smaps[:,1,:,:]
|
class2[:,0,:,:] = smaps[:,1,:,:]
|
||||||
class3 = torch.zeros([1,1,128,128], dtype=torch.float32)
|
class3 = torch.zeros([1,1,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class3[:,0,:,:] = smaps[:,2,:,:]
|
class3[:,0,:,:] = smaps[:,2,:,:]
|
||||||
class4 = torch.zeros([1,1,128,128], dtype=torch.float32)
|
class4 = torch.zeros([1,1,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class4[:,0,:,:] = smaps[:,3,:,:]
|
class4[:,0,:,:] = smaps[:,3,:,:]
|
||||||
class_msk1 = torch.zeros([1,3,128,128], dtype=torch.float32)
|
class_msk1 = torch.zeros([1,3,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class_msk1[:,0,:,:] = smaps[:,0,:,:]
|
class_msk1[:,0,:,:] = smaps[:,0,:,:]
|
||||||
class_msk1[:,1,:,:] = smaps[:,0,:,:]
|
class_msk1[:,1,:,:] = smaps[:,0,:,:]
|
||||||
class_msk1[:,2,:,:] = smaps[:,0,:,:]
|
class_msk1[:,2,:,:] = smaps[:,0,:,:]
|
||||||
class_msk2 = torch.zeros([1,3,128,128], dtype=torch.float32)
|
class_msk2 = torch.zeros([1,3,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class_msk2[:,0,:,:] = smaps[:,1,:,:]
|
class_msk2[:,0,:,:] = smaps[:,1,:,:]
|
||||||
class_msk2[:,1,:,:] = smaps[:,1,:,:]
|
class_msk2[:,1,:,:] = smaps[:,1,:,:]
|
||||||
class_msk2[:,2,:,:] = smaps[:,1,:,:]
|
class_msk2[:,2,:,:] = smaps[:,1,:,:]
|
||||||
class_msk3 = torch.zeros([1,3,128,128], dtype=torch.float32)
|
class_msk3 = torch.zeros([1,3,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class_msk3[:,0,:,:] = smaps[:,2,:,:]
|
class_msk3[:,0,:,:] = smaps[:,2,:,:]
|
||||||
class_msk3[:,1,:,:] = smaps[:,2,:,:]
|
class_msk3[:,1,:,:] = smaps[:,2,:,:]
|
||||||
class_msk3[:,2,:,:] = smaps[:,2,:,:]
|
class_msk3[:,2,:,:] = smaps[:,2,:,:]
|
||||||
class_msk4 = torch.zeros([1,3,128,128], dtype=torch.float32)
|
class_msk4 = torch.zeros([1,3,opt.originalSize,opt.originalSize], dtype=torch.float32)
|
||||||
class_msk4[:,0,:,:] = smaps[:,3,:,:]
|
class_msk4[:,0,:,:] = smaps[:,3,:,:]
|
||||||
class_msk4[:,1,:,:] = smaps[:,3,:,:]
|
class_msk4[:,1,:,:] = smaps[:,3,:,:]
|
||||||
class_msk4[:,2,:,:] = smaps[:,3,:,:]
|
class_msk4[:,2,:,:] = smaps[:,3,:,:]
|
||||||
@@ -310,5 +310,3 @@ for epoch in range(1):
|
|||||||
|
|
||||||
im.save(filename)
|
im.save(filename)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user