1 / 63

AI for Beginners from a Beginner

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.

grimm
Download Presentation

AI for Beginners from a Beginner

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. AI for Beginners from a Beginner

  2. About me • AI beginner • tomas@florian.ca • IT Consulting • Complex networking • Cloud / Virtualization systems • Cyber security

  3. Demos • What got me started down this path is impressive demos that I’ve seen in the last couple of years

  4. Question • Can anybody do this with now with open source software? • Yes

  5. Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud

  6. Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud

  7. Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud

  8. Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud

  9. Lay of the Land End user apps CLI apps Frameworks Libraries Research Open Source Closed Cloud

  10. 2x Demo • Show • Unwrap • Howto • Questions • Navigating Limits of AI • Questions

  11. Demo #1 Object Detection

  12. Object Detection

  13. Object Detection

  14. Unwrap: Black Box ./flow --imgdirsample_img/ --model cfg/yolo.cfg --load bin/yolo.weights

  15. Neural Network ./flow --imgdirsample_img/ --model cfg/yolo.cfg --load bin/yolo.weights

  16. Neural Network Model Weights (pre-trained) ./flow --imgdirsample_img/ --model cfg/yolo.cfg --load bin/yolo.weights

  17. Darkflow Dependency Stack OpenCV TensorFlow model weights Python3 darkflow Anaconda Ubuntu 18.04 VM i7 CPU, 4 GB RAM

  18. 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 tensorflowcythonnumpy • Add the repo with particular opencv version • condaconfig --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 --imgdirsample_img/ --model cfg/yolo.cfg --load bin/yolo.weights

  19. Questions?

  20. Demo #2 Generative Adversarial Network (GAN)

  21. ThisPersonDoesNotExist.com

  22. Demo #2

  23. Unwrap: Black Box

  24. GAN Generative Adversarial Network Pre trained generator network

  25. 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

  26. Howto • Git clone https://github.com/SummitKwan/transparent_latent_gan.git • Prepare anaconda • conda create -n NAME python=3.6 • source activate NAME • cdtransparent_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 • Run notebook

  27. 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

  28. 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

  29. Path of least resistance • Anaconda • cuDNN 7 • CUDA toolkit 9 • Ubuntu 16.04 • nVIDIA GPU > 6 GB RAM

  30. You can do this now

  31. Questions

  32. LimitsToo good to be true?

  33. CSI zoom and enhance

  34. CSI Zoom and Enhance for real • https://github.com/alexjc/neural-enhance

  35. Zoom and Enhance

  36. …Again

  37. … Again

  38. We got him – URL 937

  39. We look up the registered owner • Cops go out • Shoot the guy • CSI Calgary saves the day • Case closed

  40. Let’s run the same image through a different model

  41. Zoom and Enhance

  42. What?

  43. Wait … what?

  44. Side by side

  45. Different model will CONVINCINGLY lead you to a different conclusion

  46. 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

More Related