-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added nomask generator tool #28
Conversation
@@ -0,0 +1,6 @@ | |||
{ |
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.
Can we not check in checkpoint files? .ipynb_checkpoints
should be in .gitignore
, please add it if it doesn't already exist.
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.
Yup, good point. They're removed.
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"def create_image_dataset(search_term, number_of_images, augmentation=0):\n", |
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.
Can we use boolean variables (True/False
) instead of 0/1 for flags?
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.
That's actually not a boolean, it's an integer specifying how many augmentations should be generated.
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.
Ah I see, my bad, two follow up points
- Can we rename the argument to indicate its a count of the number of augmented images generated?
- Why do we need to generate the augmented images? I believe it is good practice to generate these on the fly during training/testing (@pshivraj)
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.
I think its good to add augmentation at one place in order to have a better sense as to what's happening. I would also recommend using scripts which are importable rather notebooks for better readability and version control.
" x = path.rstrip('\\n')\n", | ||
" t = x.split('/')[-1].rstrip('.jpg')\n", | ||
" im = Image.open(x)\n", | ||
" im_size = im.size\n", |
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.
Is this really necessary? Why can't we just use im.size
?
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.
Alright, I've made some changes, including modularizing the code so it can be imported into notebook, and also removing augmentation.
Added a tool to generate images from Google and create blank mask images for these images.