Skip to content
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 docstrings for Imagelab module, class, public methods and attributes #91

Merged
merged 71 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
098309e
Added docstrings for Imagelab() and get_filepaths()
sanjanag Feb 8, 2023
bc38dbb
Added docstring for Imagelab._set_default_config()
sanjanag Feb 8, 2023
9c16f8c
Added docstring for imagelab.visualize()
sanjanag Feb 8, 2023
38c8119
Added docstrings in Imagelab.find_issues()
sanjanag Feb 8, 2023
9c9f84c
Added spacing in visualize documentation
sanjanag Feb 8, 2023
e464c17
Added docstrings for Imagelab.list_possible_issue_types()
sanjanag Feb 8, 2023
2d1cf73
Added examples in Imagelab.visualize()
sanjanag Feb 8, 2023
c6076ec
Added docstrings for Imagelab.report()
sanjanag Feb 8, 2023
870fae8
Added docstrings for Imagelab.load()
sanjanag Feb 8, 2023
01017e1
Added docstrings for Imagelab class
sanjanag Feb 8, 2023
0c3ef60
Added docstrings for imagelab.py module
sanjanag Feb 8, 2023
a4ac0a8
Fixed codeblock formatting
sanjanag Feb 8, 2023
f0b1b2d
Added docstring to Imagelab.save()
sanjanag Feb 8, 2023
21f0318
Update src/cleanvision/utils/utils.py
sanjanag Feb 9, 2023
f478f92
Update src/cleanvision/imagelab.py
sanjanag Feb 9, 2023
9319d77
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
168e362
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
26d4836
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
f4a3efe
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
b72db5c
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
8c83aa3
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
d4b3951
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
de6a732
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
1fce9aa
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
0b081f4
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
40c4ba0
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
fe1feec
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
afe58e7
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
c7d853f
Update src/cleanvision/imagelab.py
sanjanag Feb 13, 2023
49d6fc1
Added newline after code-block for proper formatting in sphinx docume…
sanjanag Feb 14, 2023
f4c1d33
Improved docstrings
sanjanag Feb 14, 2023
db3a33c
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
70ad10a
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
a722c63
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
83ee4ed
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
eb643ff
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
52a3797
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
d7ca44a
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
73bdb91
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
5c3f092
Changed style of param type
sanjanag Feb 14, 2023
afaa7db
Added cross references
sanjanag Feb 14, 2023
d11e1e7
Docstring formatting improvements
sanjanag Feb 14, 2023
f8ccd43
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
8d50a47
Removed examlpes_per_issue argument from visualize
sanjanag Feb 14, 2023
8930df0
Removed docstring for examples_per_issue
sanjanag Feb 14, 2023
6a3e917
Added argument filepaths to Imagelab()
sanjanag Feb 14, 2023
9ec94d6
Renamed {issue_type}_bool column to is_{issue_type}_issue
sanjanag Feb 14, 2023
4798a4c
Fixed mypy annotations
sanjanag Feb 14, 2023
206bf89
Added an argument to avoid overwriting files by default
sanjanag Feb 14, 2023
60f7119
Merge branch 'main' into docstrings
sanjanag Feb 14, 2023
d7e2fbf
Removed multiple import lines from same package
sanjanag Feb 14, 2023
c24c981
Removed an extra line
sanjanag Feb 14, 2023
551d790
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
7768dab
Resolved comment
sanjanag Feb 14, 2023
4596350
Merge remote-tracking branch 'origin/docstrings' into docstrings
sanjanag Feb 14, 2023
d5d31e9
Resolved comment
sanjanag Feb 14, 2023
59d413a
Specify only one of data_path or filepaths, in all other cases throw …
sanjanag Feb 14, 2023
2283481
Added documentation for n_jobs
sanjanag Feb 14, 2023
ab3a2d7
Improved docs formatting
sanjanag Feb 14, 2023
d49dc16
Improved docs formatting
sanjanag Feb 14, 2023
5df393e
Fixed get_max_n_jobs
sanjanag Feb 14, 2023
5c01346
Update src/cleanvision/imagelab.py
sanjanag Feb 14, 2023
a5d7937
Fixed flake8 error
sanjanag Feb 14, 2023
4282439
Merge remote-tracking branch 'origin/docstrings' into docstrings
sanjanag Feb 14, 2023
e614e47
Fixed mypy error
sanjanag Feb 14, 2023
50d1bfd
Update src/cleanvision/imagelab.py
sanjanag Feb 17, 2023
283a985
Renamed allow_overwrite to force
sanjanag Feb 17, 2023
d87f938
Updated imagelab.report()
sanjanag Feb 17, 2023
844c296
Merge branch 'main' into docstrings
sanjanag Feb 17, 2023
9f3bdae
Filter issues first and then limit by number of issues to report
sanjanag Feb 17, 2023
454d3cd
Added print statement to indicate more issues were found
sanjanag Feb 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
346 changes: 195 additions & 151 deletions examples/demo.ipynb

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions examples/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
This example demonstrates the default Imagelab workflow to detect various types of issues in an image dataset.
"""

imagelab = Imagelab(dataset_path) # initalize imagelab
imagelab = Imagelab(data_path=dataset_path) # initialize imagelab
imagelab.list_default_issue_types() # list default checks
imagelab.visualize() # visualize random images in dataset

Expand All @@ -24,12 +24,12 @@

print("Summary of all issues checks\n", imagelab.issue_summary.to_markdown())
imagelab.visualize(
issue_types=["blurry"], examples_per_issue=8
issue_types=["blurry"], num_images=8
) # visualize images that have specific issues

# Get all images with blurry issue type
blurry_images = imagelab.issues[
imagelab.issues["blurry_bool"] == True
imagelab.issues["is_blurry_issue"] == True
].index.to_list()
imagelab.visualize(image_files=blurry_images) # visualize the given image files

Expand All @@ -42,14 +42,14 @@
Example 2

This example demonstrates using Imagelab to:
1. Check data for specific types of issues
1. Check data for specific types of issues
2. Incrementally detect additional types of issues with existing Imagelab
3. Specify nondefault parameter to use when detecting a particular issue type (e.g. a different threshold)
4. Save and load Imagelab to file
5. Report only specific issue types
"""

imagelab = Imagelab(dataset_path)
imagelab = Imagelab(data_path=dataset_path)
issue_types = {"near_duplicates": {}}
imagelab.find_issues(issue_types)
imagelab.report()
Expand Down Expand Up @@ -78,7 +78,7 @@
4. Increase the size of images in the grid displayed by visualize
"""

imagelab = Imagelab(dataset_path)
imagelab = Imagelab(data_path=dataset_path)
imagelab.find_issues()
imagelab.report(["near_duplicates"])

Expand All @@ -96,7 +96,7 @@
imagelab.report(num_top_issues=5, max_prevalence=0.01)

# Increase cell_size in the grid
imagelab.visualize(issue_types=["light"], examples_per_issue=8, cell_size=(3, 3))
imagelab.visualize(issue_types=["light"], num_images=8, cell_size=(3, 3))

"""
Example 4
Expand All @@ -106,7 +106,7 @@
# Run imagelab on custom issue
from custom_issue_manager import CustomIssueManager

imagelab = Imagelab(dataset_path)
imagelab = Imagelab(data_path=dataset_path)
issue_name = CustomIssueManager.issue_name
imagelab.list_possible_issue_types()

Expand Down
Loading