Skip to content

Instantly share code, notes, and snippets.

# Categorizer, by Peter Baylies (@pbaylies)
# Unsupervised categorization of generated or real images using deep features, dimensionality reduction, and clustering
import click
from tqdm import tqdm
import math
import numpy as np
import torch
import pickle
import PIL.Image
import os.path
@pbaylies
pbaylies / gist:671b15e76411597d6bf7556271c08ce1
Last active October 29, 2021 02:00
Clustering LAION, the first million images - added counts
0 - accessories, products, hiking 21277
1 - diagrams 5257
2 - appliances 6535
3 - outdoors, sea, sky 11404
4 - products, cups, lamps, plates, candles 19363
5 - book covers 14825
6 - product photos, chairs, furniture 19445
7 - text, buttons, cartoons (with text) 15990
8 - person 11099
9 - video game graphics 15489
@pbaylies
pbaylies / gist:43cab2c46c4cc46e34c3989313a32d3a
Last active October 24, 2021 05:04
WikiArt Example Generation Updated
!git clone https://github.com/dvschultz/stylegan3
!mv stylegan3/* .
!wget https://archive.org/download/wikiart-stylegan2-conditional-model/WikiArt5.pkl
!pip install ninja
import sys
sys.path.insert(0,'/content/')
import ipywidgets as widgets
import pickle
@pbaylies
pbaylies / maze.py
Created August 18, 2021 02:29
Codex-assisted ASCII maze solver
class Square:
"""
Represents a square in the maze.
"""
WALL = 0
OPEN = 1
START = 2
EXIT = 3
# Modified StyleGAN2 Projector with CLIP, addl. losses, kmeans, etc.
# by Peter Baylies, 2021 -- @pbaylies on Twitter
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
@pbaylies
pbaylies / aidungeon2.txt
Created December 10, 2019 02:00
How I Won The Game
You are Spazmodius, a wizard living in the kingdom of Larion. You have a staff and a spellbook. You finish your long journey and finally arrive at the ruin you've been looking for. You look around and see that it's a small ruined tower with a single door on the top floor.
The door is locked
> You cast knock on the door.
You knock on the door. No answer. You try again. Still no response. The sun has set and there isn't much light left to cast shadows over the door. You're starting to get frustrated. What kind of magic does this guy use
> You cast a spell to open the door.
Links https://medium.com/halting-problem/google-ai-research-division-to-issue-phd-degrees-from-google-8a6954293047
Google AI Research Division to Issue PhDs from Google?
The University of Washington is planning on offering a PhD in artificial intelligence and machine learning at the end of this year. This will be an unprecedented move for Google, which has never offered such a degree before. It would mark the first time that any major tech company offers its employees a formal education in computer science.
According to reports, the university plans to offer two types of degrees — one with a focus on deep learning, or “neural nets,” while another focuses more on traditional computing. Both are expected to cost around $80,000 per year each.
While it may seem like a strange move, it’s not entirely unprecedented. In fact, there have been several other universities who have started offering doctorates in AI, including Carnegie Mellon University, Stanford University, and New York University. However,