Skip to content

Instantly share code, notes, and snippets.

View mantasu's full-sized avatar

Mantas mantasu

View GitHub Profile
@mantasu
mantasu / kaggle-to-colab.ipynb
Last active January 29, 2024 17:15
How to utilize Colab GPUs for training with your own data that can be uploaded to Kaggle
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mantasu
mantasu / generate_overlays.py
Created September 20, 2023 15:31
Script for creating occluded glasses and their masks
# Used in: https://www.kaggle.com/datasets/mantasu/glasses-segmentation-synthetic-dataset
# Prerequisities: Portrait Eyeglasses and Shadows Removel Dataset: https://github.com/StoryMY/take-off-eyeglasses
import os
import cv2
import random
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
@mantasu
mantasu / mp_plotter.py
Last active June 18, 2023 00:21
Animated plotting on a separate process
import abc
import time
import threading
import numpy as np
import multiprocessing
import matplotlib.pyplot as plt
from functools import partial
from matplotlib.axes import Axes
from matplotlib.figure import Figure
@mantasu
mantasu / face-attributes-grouped.ipynb
Last active June 7, 2023 12:35
Face attribute dataset creation by automatic image downloading and processing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mantasu
mantasu / install-cuda-tf-pytorch.md
Last active October 21, 2024 09:24
Tensorflow & Pytorch installation with CUDA (Linux and WSL2 for Windows 11)

Install Tensorflow & Pytorch with CUDA [Linux | WSL2]

Overview

This guide provides steps on how to install Tensorflow and Pytorch on Linux environment (including WSL2 - Windows Subsystem for Linux) with NVIDIA GPU support. Here I focus on Ubuntu 22.04 and WSL2 (Windows 11) but things should work on more/less recent/relevant versions. From what I've checked there are no full consistent guidelines, hopefully this one should clear things up (also serve as a reminder for me).

To install purely on Windows 10/11 (no WSL), I suggest to follow this tutorial.

GPU Setup