Add histogram equalization fcn (#2049)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-01-26 17:30:42 -08:00
1 parent d68afedb32
commit 08d3119e09
3 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ class Model(nn.Module):
for si, fi in zip(s, f):
xi = scale_img(x.flip(fi) if fi else x, si, gs=int(self.stride.max()))
yi = self.forward_once(xi)[0] # forward
# cv2.imwrite('img%g.jpg' % s, 255 * xi[0].numpy().transpose((1, 2, 0))[:, :, ::-1]) # save
# cv2.imwrite(f'img_{si}.jpg', 255 * xi[0].cpu().numpy().transpose((1, 2, 0))[:, :, ::-1]) # save
yi[..., :4] /= si # de-scale
if fi == 2:
yi[..., 1] = img_size[0] - yi[..., 1] # de-flip ud