Vladimir Iglovikov
Sr. Software Engineer at Lyft, Level5
Ph.D. in Physics
Kaggle Grandmaster
Fresh grad without PhD
Fresh grad with PhD
(could have 100500 papers at NeurIPS, CVPR, ECCV, etc)
Most likely (90% chance) you will never get to L6!
Ownership
Technical
Communication
Your level
Not your level
Models are not everything!
You need to train
ownership
and
communication!
Example:
Face Mask Detector
Target audience:
Detector with 2 classes:
mask / no mask
Detector with two heads:
face and face attributes
Detector + classifier
Slowest but the most accurate.
Our choice.
Face Detector
Face classifier
0.99
0.99
0.01
Stage I
Stage II
class + bbox + landmarks
class + bbox + landmarks
class + bbox + landmarks
RetinaFace: Single-stage Dense Face Localisation in the wild arXiv:1905.00641
pip install retinaface-pytorch
GitHub
PyPi
Collab
import numpy as np
import streamlit as st
from PIL import Image
from retinaface.pre_trained_models import get_model
from retinaface.utils import vis_annotations
import torch
st.set_option("deprecation.showfileUploaderEncoding", False)
@st.cache
def cached_model():
m = get_model("resnet50_2020-07-20", max_size=1024, device="cpu")
m.eval()
return m
model = cached_model()
st.title("Detect faces and key points")
uploaded_file = st.file_uploader("Choose an image...", type="jpg")
if uploaded_file is not None:
image = np.array(Image.open(uploaded_file))
st.image(image, caption="Before", use_column_width=True)
st.write("")
st.write("Detecting faces...")
with torch.no_grad():
annotations = model.predict_jsons(image)
if not annotations[0]["bbox"]:
st.write("No faces detected")
else:
visualized_image = vis_annotations(image, annotations)
st.image(visualized_image, caption="After", use_column_width=True)
Network
0.9999
0.0001
Task
Mask classification collab: https://colab.research.google.com/drive/1VkSK5MKIuGPIA31KJpGiFe_FafYC4xfD
Detection + classification collab: https://colab.research.google.com/drive/13Ktsrx164eQHfDmYLyMCoI-Kq0gC5Kg1
WebApp: https://facemaskd.herokuapp.com/
There are small incremental steps that make your work:
Will boost your ownership and comminication.
Blog: http://ternaus.blog
Twitter: @viglovikov
Kaggle: https://www.kaggle.com/iglovikov
LinkedIn: https://www.linkedin.com/in/iglovikov/