SimonThomine / IndustrialDefectLib

Library for generating industrial synthetic defects
0 stars 1 forks source link

Issues with Non-Square Images and Default CutPaste Mode #1

Open Wavelet303 opened 5 months ago

Wavelet303 commented 5 months ago

Hi there,

First, I want to thank you for your excellent work on this project; it's been incredibly helpful. However, I've been encountering an error when using methods on non-square images, specifically with dimensions like 1221x512. It seems like the method doesn't handle these aspect ratios correctly. Could you please confirm if there's a specific requirement for image dimensions or a workaround for this issue?

Additionally, I've noticed that the CutPaste method does not seem to activate the 3-way mode by default. Is there a way to enable this mode explicitly, or is it intended to be manually configured?

Lastly, I'm considering increasing the number of patches generated by the NSA method from 1 to 3. Would you recommend this change? Could this adjustment improve performance or accuracy in certain scenarios?

Thank you for your assistance!

SimonThomine commented 5 months ago

Hi, Sorry for the answer time. I'm glad the project is helpful to you :) For the non-square images, I'm aware that the defect generation only works on square image. It was more straightforward to make the defect genaration works on square images. However, the code can be upgraded to a version that handle non-square images. The 3-way mode cannot be enabled explictly but I will change that to make it configurable. For the number of patches for NSA, I think this is a good idea and can potentially increase the performance or accuracy but I would suggest generating a number of patches between 1 and 3 instead of always 3 patches. If you need clarification, let me know.