-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using all three color spaces #4
Comments
@yiqings @lyl010221 @lyl750697268 Hello, I would really appreciate any guidance from you guys, thank you in advance! |
@chokevin8 Thanks for your input. Could you specify your questions, I am afraid I didn't really catch your question. |
@yiqings Sorry for a belated response, I've looked back at this and the problem was in the .yaml file. I generated my own .yaml file after calculating the statistics for my own training dataset. I have the same exact .yaml file like yours here. The problem is that for color_space = Random, it will create an error in the RandStainNA class in the randstainna.py file rightly so, since Random is not a color_space. To recreate your work, do I just need to create a random number generator with equal probability p = 1/3 so that everytime the class is called one of the three color spaces are selected? |
Heyy @chokevin8 In lines 121-145 of file "/classification/timm/data/transforms_factory.py" you may find this function. The probabilities of norm_jitter are different depending on the settings, for example in "r/classification/[scripts_CRC_final]", you may find the p=0.5 in the last exp-settings. But please remember: this is not an official reply from the package author, though I like this work a lot ;) Jingsong |
So I calculated my dataset statistics by using dataset_statistics.py for all three color spaces (RGB, HSV, HED), and then created a yaml file that looked exactly like this. When trying to use this, do I just fix this line (line 50) so that self.color_space is selected randomly out of the three color spaces? Then, when I put it inside my transforms function like below, the transforms will select one color space, augment & normalize and then re-normalize with Reinhard method? I'd appreciate some help with this, thanks!
#randstain_all.yaml is my yaml folder
val_transforms = transforms.Compose([RandStainNA(
yaml_file="randstainna_all.yaml",
std_hyper=-0.3,
probability=0.8,
distribution="normal",
is_train=True
)])
The text was updated successfully, but these errors were encountered: