Particle1904 / DatasetHelpers

Dataset Helper program to automatically select, re scale and tag Datasets (composed of image and text) for Machine Learning training.
MIT License
170 stars 9 forks source link

[BUG] Dataset Helper move sometimes the whole images during process tags #37

Closed BenDes21 closed 3 weeks ago

BenDes21 commented 2 months ago

Hi, it's been 2 times that when I process my tags with some tags to remove, replace etc.. it's move the whole images into the output folder of the generate tags folder after the process or inside the "C:..\Documents\Dataset Helper" folder.

its supposed to keep all the .txt in the same imput folder so it's probably a bug

Particle1904 commented 2 months ago

I'd have to check the code but the "Process tags" page only moves image (.png, .jpg, etc) files if you check the "rename" checkbox. It does so by creating a copy of the image and creating a new numerical name. Technically speaking, C# can't (I think this is the same for any programming language) rename files, to rename a file programmatically, it creates a copy with the new name then delete the old file.

https://learn.microsoft.com/en-us/dotnet/api/system.io.file.move?view=net-8.0 https://learn.microsoft.com/en-us/dotnet/api/system.io.fileinfo.moveto?view=net-8.0

Not sure what is the problem, really.