Skip to content

AllenNeuralDynamics/image-compression-challenge

Repository files navigation

Image Compression Challenge

License Code Style semantic-release: angular Interrogate Coverage Python

This repository contains the scoring code for a Kaggle challenge to develop advanced image compression methods for massive 3D mouse brain datasets acquired with a custom light sheet microscope. Our evaluation pipeline consists of two stages:

  1. Validate Submission

    • Check submission contains required files
    • Compute Structural Similarity (SSIM) between original and compressed image
    • Evaluate segmentation generated from compressed image
  2. Score Submission

    • Calculate the average file size of the compressed image

A submission must successfully pass all three validation checks in Step 1 to proceed to being scored in Step 2. Submissions that fail any validation check are considered invalid and will not receive a score.

Prepare Submission

After running your image compression algorithm on the test dataset: block_005, block_006, block_007, block_008, block_009; submit your results in a single ZIP archive with the following files:

  • Compressed Images

    • Format: Any
    • Filename: compressed_{num}.{extension}
  • Decompressed Images

    • Format: .tiff
    • Filename: decompressed_{num}.tiff
    • Save your compressed images as a TIFF
  • Segmentations

    • Format: .tiff
    • Filename: segmentation_{num}.tiff
    • Generate segmentations using the provided model ([download here](insert link)).
    • Use the aind-exaspim-neuron-segmentation repository to compute affinity maps, and convert them to segmentations by following the Predict section of the README with default inference.predict parameters.
  • SWCs

    • Format: .zip
    • Filename: skeletons_{num}.zip
    • Must be generated from the segmentations by following the final step in the “Predict” section of the repository’s README.

Example of Submission Layout

  submission.zip
  ├── compressed_005.zarr
  ├── decompressed_005.tiff
  ├── segmentation_005.tiff
  ├── skeletons_005.zip
  ├── ...
  ├── compressed_009.zarr
  ├── decompressed_009.tiff
  ├── segmentation_009.tiff
  └── skeletons_009.zip

Score Submission

Example of calling the score routine

from image_compression_challenge.score import score


# Initializations
submission_zip_path = "path-to-submission-zip"

# Main
score(submission_zip_path)

Installation

To use the software, in the root directory, run

pip install -e .

License

image-compression-challenge is licensed under the MIT License.

About

A python package for scoring submissions to an image compression challenge on Kaggle.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages