Skip to content

Instantly share code, notes, and snippets.

View dhassault's full-sized avatar
🎯
Focusing

Yann LE GUILLY dhassault

🎯
Focusing
View GitHub Profile
@dhassault
dhassault / dataloader_ade20k_tf2.py
Last active December 8, 2019 15:06
Code sample to load ADE20k (scene parsing) to train a segmentation model with tensorflow.
import tensorflow as tf
from IPython.display import clear_output
import IPython.display as display
from glob import glob
import matplotlib.pyplot as plt
# the dataset is downloaded in data/raw/ade20k/
IMG_SIZE = 224
# similar to glob but with tensorflow
@dhassault
dhassault / visualize_ade20k.py
Last active December 8, 2019 15:07
This shows the ADE20k segmentation masks and the corresponding categories.
from glob import glob
from pathlib import Path
import numpy as np
import tensorflow as tf
from matplotlib import gridspec
from matplotlib import pyplot as plt
from PIL import Image
# SceneParsing is already downloaded in data/raw/ade20k/
@dhassault
dhassault / tests.yaml
Last active July 2, 2022 02:45
Github Actions Workflow
name: Unittests
on:
pull_request:
paths-ignore:
- "docs/**"
- "*.md"
jobs:
check-syntax-lints-type: