Skip to content

jacobmarks/image-quality-issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Image Quality Issues Plugin

common_image_issues_updated

This plugin is a Python plugin that allows you to find common issues in your image datasets.

With this plugin, you can find the following issues:

  • πŸ“ Aspect ratio: find images with weird aspect ratios
  • 🌫️ Blurriness: find blurry images
  • β˜€οΈ Brightness: find bright and dark images
  • πŸŒ“ Contrast: find images with high or low contrast
  • πŸ”€ Entropy: find images with low entropy
  • πŸ“Έ Exposure: find overexposed and underexposed images
  • πŸ•―οΈ Illumination: find images with uneven illumination
  • πŸ§‚ Noise: find images with high salt and pepper noise
  • 🌈 Saturation: find images with low and high saturation

For any of these properties, the plugin allows you to compute with the following options:

  • In real-time, or in delegated execution mode
  • For full images, or for any object patches, specified by a Detections field
  • for the entire dataset, the current view, or for currently selected samples

These computations are all united via a find_issues operator, which allows you to designate images (or detections) as plagued by specific issues. You can run the issue-finding operator in single-issue or multi-issue mode, and can specify the threshold for each issue at the time of execution. All necessary computations which have not yet been run will be run.

Updates

Watch On Youtube

Video Thumbnail

Installation

fiftyone plugins download https://github.com/jacobmarks/image-quality-issues/

Properties

Aspect Ratio

Relatively self-explanatory, this is the raio of image (or patch) width to height. The minimum of width/height and height/width is computed.

Operator: compute_aspect_ratio

Compute aspect ratio of images: image_aspect_ratio_compressed

Compute aspect ratio of detection patches: patch_aspect_ratio_compressed

Blurriness

Blurriness measures the lack of sharpness, or clarity in the image. It encapsulates multiple sources, including motion blur, defocus blur, and low-quality imaging. You can compute blurriness with the compute_blurriness operator.

blurriness_compressed

Brightness

Brightness attempts to quantify the amount of light in an image, as it is perceived by the viewer. For RGB images, it is computed by taking a weighted average of the RGB channels for each pixel and computing a luminance score. You can run the computation with compute_brightness.

brightness_compressed

This brightness score allows you to identify dark images and bright images.

Contrast

Contrast measures the difference in brightness between the darkest and brightest parts of an image. Low contrast means high uniformity across the image. You can compute the contrast for your images or patches with compute_contrast.

contrast_compressed

Entropy

Entropy quantifies the information content of the pixels in an image. The more complex the visual structure, the higher the entropy. Low entropy images typically provide little information to a model, so it may be desired to remove them from the dataset before training. Compute entropy with compute_entropy.

entropy_compressed

Exposure

Exposure measures the amount of light per unit area reaching the image sensor or film. It is related to but distinct from brightness. Low exposure and high exposure can both be issues that plague images captured by cameras. Compute exposure with compute_exposure.

exposure_compressed

Salt 'n Pepper Noise

Salt and pepper noise is a variety of noise in images that comes in the form of black and white pixels. It can result in grainy images, or images which are hard to make accurate predictions on. Compute the salt and pepper noise with compute_salt_and_pepper.

salt_and_pepper_compressed

Saturation

Saturation measures the intensity or purity of color in an image. Grayscale images have low saturation, whereas vivid, rich images have high saturation. Compute saturation with compute_saturation.

saturation_compressed

Vignetting

Vignetting measures the dropoff in brightness and saturation near the periphery of an image compared to at its center. This can be an undesired consequence of camera settings. Compute vignetting with compute_vignetting. vignetting_compressed

find_issues

Finds images with brightness, aspect ratio, or entropy issues. You can specify the threshold for each issue type, and which issue types to check for.

Python SDK

You can also use the compute operators from the Python SDK!

import fiftyone as fo
import fiftyone.operators as foo
import fiftyone.zoo as foz

dataset = fo.load_dataset("quickstart")

## Access the operator via its URI (plugin name + operator name)
compute_brightness = foo.get_operator(
    "@jacobmarks/image_issues/compute_brightness"
)

## Compute the brightness of all images in the dataset
compute_brightness(dataset)

## Compute brightness of a view
view = dataset.take(10)
compute_brightness(view)

## Compute brightness of detection patches
compute_brightness(dataset, patches_field="ground_truth")

Note: The find_issues operator is not yet supported in the Python SDK.

Note: You may have trouble running these within a Jupyter notebook. If so, try running them in a Python script.

See Also

Here are some related projects that this plugin is inspired by and adapted from:

About

FiftyOne Plugin for finding common image quality issues

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages