-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add RGB intensity regularization #18
base: master
Are you sure you want to change the base?
Conversation
for hkl_name in train_filenames: | ||
|
||
# print hkl_name | ||
print hkl_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation doesn't seem right
as a general guideline, take a look at python pep 8 and see the auto-checking/formatting tool in your text editor, to keep the code format nice. |
could you also report the accuracy after adding the RGB augmentation? |
I just finished one testing of the RGB regularization. The result shows that when using it in training and not using it in validation, When using it in both training and validation, The alpha with standard deviation = 0.1 is being trained. So far it seems not converge as good as standard deviation = 0.01. |
@hma02 any updates here? it seems I missed your last comment. so that means the augmentation doesn't bring any improvement then? |
@gwding Sorry. I just checked the job. It seems the RGB augmentation doesn't improve much. Using alpha=0.1 even makes the error higher: validation error 55.723157 % I'm also confused. Maybe I did something wrong somewhere. |
@hma02 any updates on this? is it still under development? |
Add RGB regularization on image pixels to make the Neural Network invariant to changes in the intensity and color of the illumination. First, run python get_cov_matrix.py to generate the RGB covariance matrix file and RGB mean file based on all training images. Then use the new proc_load.py during training, which will load the covariance matrix and add RGB regularization to each image before cropping.
Here's a sample result of the the RGB covariance matrix generated from 1.2 million training images:
[[RR RG RB], [GR GG GB], [BR BG BB]]=
[[ 5092.20548764 4433.19480634 3994.61330229]
[ 4433.19480634 4832.88253809 4575.09578822]
[ 3994.61330229 4575.09578822 5332.67691264]]
This is related to issue #15