7 Respostas
+ 3
so what you want is to use opencv to detect the ROI (signatures) and center it then perhaps crop or resize the images?
but looking at the dataset, it seems that the primary problem is that the cropping and size of the images varies across the different folders. Perhaps you mean to address that problem?
+ 3
Here you can see methods for standardization, normalization and scaling - this is the first adress for information:
https://scikit-learn.org/stable/modules/preprocessing.html
+ 1
what toolset are you using?
here is a nice link for image preprocessing in ml
https://machinelearningmastery.com/how-to-normalize-center-and-standardize-images-with-the-imagedatagenerator-in-keras/
+ 1
I used OpenCv and OS
+ 1
basically, you can crop, resize or pad so that all the images have the same dimensions.
First determine the actual dimension of the image you are going to use in your training data.
Then write a python script to bstch process your files.
read these:
https://blog.roboflow.com/you-might-be-resizing-your-images-incorrectly/#:~:text=Principally%2C%20our%20machine%20learning%20models,and%20that%20time%20adds%20up.
https://stackoverflow.com/questions/60439843/how-do-i-resize-images-in-python-for-machine-learning
https://zuru.tech/blog/the-dangers-behind-image-resizing
0
Hello you can center an image in Python preprocessing, you typically need to calculate the offset needed to move the image to the center of a desired canvas size and then apply this offset to the image.
1- Load the image.
2- Determine the desired canvas size.
3- Calculate the offset needed to center the image on the canvas.
4- Apply the offset to the image.
5- Save or display the centered image.
0
Try look at TensorFlow library for that..