Open handspeaker opened 7 years ago
I wonder if program accepts PNG? If so, using PNG is better since PNG is lossless format.
@handspeaker I will merge this once I tested it out on the exported model. The reason jpg is chosen is because it is inherited from the reference repo.
hi @kaonashi-tyc , When I use font2img.py to generate jpg format images, I find the generated images have some noise around the strokes. I think it will degrade the training result more or less. Then after several experiments I find the problem lies in PIL image save function. Exactly in font2img.py line 87
e.save(os.path.join(sampledir, "%d%04d.jpg" % (label, count)))
I change this line by
e.save(os.path.join(sampledir, "%d%04d.jpg" % (label, count)), quality=100)
And the noise disappear.