Image Diversity
This script measures the distance from average for each image in the input set, and copies the specified number of highest scoring images to a new folder called 'diverse'. If ROI_config.txt is present in the same folder as the input images, the ROI in that file will be used to do the measurement. If not present, it will use a hard-coded default ROI.
- Open Image Diversity by typing
python image_diversityNEW.py
- Click open by the Select Files field
Note: this program filters so that only images can be selected, and once you click open it may take a while.
- It will then ask for corresponding traces to match the images
- Hit open once you have selected the corresponding traces
- The main screen tells the number of images selected
- Specify the number for training and testing
training is the first time it runs through, and then the number you test comes from the training batch
specify the numer of most diverse and least diverse
most diverse will select images that vary greatly in their tongue contours, while least diverse will select images that all have similar tongue contours
- That will reduce the numbr of overall images based on your specifications
- Select the ratio of most diverse to least diverse
- From this you can select a test set. It is recommended that you use a sample from your most diverse images for testing.
- batches for remaining is simply all of the images that you have not selected to train with, and they will go into a folderentitled remaining
Note: if an error during this part of the process occurs then some settings may be missing
- Save to your folder of choice
- Click OK
- From this a graph will open
This shows Diversity Scores on the Y axis. Diversity scores will be higher if you have more diverse images and vice versa for least diverse. On the X axis it simply ranks the numbers based on their order.
- You can save this graph if you would like or take a screenshot
The program will close automatically when it is done running (T: may not be correct, program has not closed automatically for me yet)
- Open the folder where you specified to have the images Note: In this folder there will be several other new folders. batch remaining is the folder discussed above. diversity log is the record of what happened in the file move. sorted results are the scores for each image.