Skip to content

Instantly share code, notes, and snippets.

View TianyiFranklinWang's full-sized avatar
:octocat:
Researching

Tianyi Wang TianyiFranklinWang

:octocat:
Researching
View GitHub Profile

Reshape + Transpose Trick by lafoss Explained Hi all , I would first like to thanks Kaggle and organizers for this lovely competition , although I was really shocked to see just 13 files amongst test and train when I just entered the competition . After two days of Studying the competition , now its fairly clear of what is going on .

Thanks to @iafoss and his trick , I learned how to tile the big tiff files into something trainable . Its a fairly simple and elegant trick but at first sight might look overwhelming and complicated , Since I know how difficult it can be deciphering it , I just thought to share the explanation for making it easy to others . I will walk you through the code one by one

Step 1 : Reading the big tiff file

@TianyiFranklinWang
TianyiFranklinWang / hierarchical_patch.py
Last active February 7, 2023 04:50
Hierarchically generate and store patches from WSIs.
"""This code is for hierarchically patching large whole slide images.
Copyright (c) 2022 Tianyi Wang & Mengkang Lu
All rights reserved.
Released under MIT License.
"""
import gc
import json
import os