AI for Beginners from a Beginner
About me AI beginner tomas@florian.ca IT Consulting Complex networking Cloud / Virtualization systems Cyber security
Demos What got me started down this path is impressive demos that I’ve seen in the last couple of years
Question Can anybody do this with now with open source software? Yes
Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud
Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud
Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud
Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud
Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud
Navigating Limits of AI 2x Demo Show Unwrap Howto Questions Navigating Limits of AI
Demo #1 Object Detection
Object Detection
Object Detection
Unwrap: Black Box ./flow --imgdir sample_img/ --model cfg/yolo.cfg --load bin/yolo.weights
Neural Network ./flow --imgdir sample_img/ --model cfg/yolo.cfg --load bin/yolo.weights
Neural Network Model Weights (pre-trained) ./flow --imgdir sample_img/ --model cfg/yolo.cfg --load bin/yolo.weights
Darkflow Dependency Stack model weights darkflow TensorFlow OpenCV Python3 Anaconda Ubuntu 18.04 VM i7 CPU, 4 GB RAM
Howto git clone https://github.com/thtrieu/darkflow Create conda virtual env for the project conda create -n NAME python=3.6 source activate NAME Install dependencies conda install tensorflow cython numpy Add the repo with particular opencv version conda config --add channels conda-forge Install opencv conda install opencv Run setup python3 setup.py build_ext --inplace Download weight file for the model https://drive.google.com/drive/folders/0B1tW_VtY7onidEwyQ2FtQVplWEU and place it in bin/ Run ./flow --imgdir sample_img/ --model cfg/yolo.cfg --load bin/yolo.weights
Questions?
Demo #2 Generative Adversarial Network (GAN)
ThisPersonDoesNotExist.com
Demo #2
Unwrap: Black Box
GAN Generative Adversarial Network Pre trained generator network
Transparent Latent GAN Pretrained network model Transparent latent GAN Python3 CUDA toolkit cuDNN Jupyter Anaconda Ubuntu 16.04 VM 2 CPU,6 GB RAM, K80 GPU with 12GB RAM,50 GB Disk
Howto Git clone https://github.com/SummitKwan/transparent_latent_gan.git Prepare anaconda conda create -n NAME python=3.6 source activate NAME cd transparent_latent_gan Install dependencies conda install pip pip install -r requirements.txt conda install cudatoolkit conda install cudnn conda install jupyter Download pre-trained model https://www.dropbox.com/sh/y1ryg8iq1erfcsr/AAB--PO5qAapwp8ILcgxE2I6a?dl=0 (extract to same folder structure) Run notebook jupyter notebook Navigate to URL shown at startup + notebooks/transparent_latent_gan/src/notebooks/tl_gan_ipywidgets_gui.ipynb
Hardware Notes Google Compute Engine preemptive K80 ~$0.20 CAD / Hour I used vanilla Ubuntu 16.04 and installed Nvidia drivers on it myself Prebuilt images but more $ per hour (not preemptive) REMEMBER TO TURN IT OFF Nvidia GX 1060 (6 GB RAM … more is better) $300 Nvidia-smi
Expectations 80% of time dealing with building the stack Poor documentation Missing/incompatible pre-trained models Dependency hell (much better with Anaconda) Unhelpful error messages 20% real AI work
Path of least resistance Anaconda cuDNN 7 CUDA toolkit 9 Ubuntu 16.04 nVIDIA GPU > 6 GB RAM
You can do this now
Questions
Limits Too good to be true?
CSI zoom and enhance
CSI Zoom and Enhance for real https://github.com/alexjc/neural-enhance
Zoom and Enhance
…Again
… Again
We got him – URL 937
We look up the registered owner Cops go out Shoot the guy CSI Calgary saves the day Case closed
Let’s run the same image through a different model
Zoom and Enhance
What?
Wait … what?
Side by side
Different model will CONVINCINGLY lead you to a different conclusion
Which license plate was it? Maybe URL 937 Maybe BBL 3698 Maybe SOMETHIN ELSE Even though we are seeing it in front of our own eyes there is a threshold at which AI can just make stuff up and make it look like the real thing
NN has learned to make convincing fakes Those fakes may be rooted in reality or they may be purely hallucinated into existence The degree to which it’s rooted in reality depends on the data it’s been exposed to during training Garbage in – elaborate bullshit out
In the news: Woody Herrelson Look alike The image of the suspect, taken from the surveillance footage, was extremely pixelated and turned up no results in Facial ID system Investigators used high-quality images of Harrelson found on Google and submitted them in place of the suspect's more pixelated image. The result ended in a match. An unidentified man was booked and charged for petty larceny.
So when is the AI apocolypse coming?
Sells well but the world doesn’t need more of it Risk of AI Create AI that succeeds at producing output that is apparently super-intelligent, super accurate, and super trustworthy When in reality the output is elaborately disguised bullshit Sells well but the world doesn’t need more of it
GAN Limit Demo
How GAN works
How GAN works
Be aware of AI limits and use it within those limits Use AI within it’s limits
Best Open Source AI in 2019 https://medium. mybridge
Presentation copy: lab.florian.ca tomas@florian.ca Questions? Presentation copy: lab.florian.ca tomas@florian.ca
Useful Links AI Cheat sheet https://becominghuman.ai/cheat-sheets-for-ai-neural-networks-machine-learning-deep-learning-big-data-678c51b4b463
Other cool stuff Video Game graphics GAN https://thenewstack.io/deep-learning-ai-generates-realistic-game-graphics-by-learning-from-videos/ Style GAN https://www.youtube.com/watch?v=-R9bJGNHltQ