Overengineering

a smart doorbell

Whoami

Commercial Engineer (not a real engineer btw)

Now ML Engineer

Love to tinker

About Overengineering

I need HDMI out and my video card doesn't have it.

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

...

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

I'm a poor, broke student and €10 is 4 days worth of food

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

I'm too lazy to go out and too impatient to buy online

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

Cuz it's too easy

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

Listen here you lil shit

I need HDMI out and my video card doesn't have it.

Is there a way to enable the video out of the motherboard while a GPU is attached?

Is there still a free port on the GPU?

Yeah, but it's DisplayPort, I need HDMI

Why not just buy an adapter for €10?

It's personal now, I wanna know if it can be done

Underlying beauty of doing things inefficiently

Context

Working @ Home

Working @ Home

Working @ Home

Working @ Home

Drawing up a plan

Option 1

Sell my soul

Option 1

Sell my soul

Option 2

Attach probe to electrical signal

Option 2

Attach probe to electrical signal

Risk of death

Option 2

Attach probe to electrical signal

Risk of death

Code would be simple and easy to maintain

Option 2

Attach probe to electrical signal

Risk of death

Code would be simple and easy to maintain

System would work reliably with no false positives

Option 3

...

Option 4

Let's add a constraint!

Option 42

DIWhy

Data Preparation

VS

Machine Learning

Step 1

Step 1: DEeP LeAriNg

Step 1: DEeP LeAriNg

Step 1: DEeP LeAriNg

Step 1: DEeP LeAriNg

model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=input_shape))
model.add(Conv2D(64, kernel_size=(3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))

Step 1: DEeP LeAriNg

model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3), activation='relu', input_shape=input_shape))
model.add(Conv2D(64, kernel_size=(3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))

Credit Yung-Hsiang Shawn Chang

Step 1: DEeP LeAriNg

Step 2

Step 2: Less DEeP LeAriNg

Step 2: Less DEeP LeAriNg

Step 2: Less DEeP LeAriNg

Step 3

Step 3: Cry

  • Deep Learning Models need a lot of data
  • Deep Learning Models need to learn the data from scratch
  • Deep Learning Models take quite some computation to train

Step 4

Step 4: LeArNinG

  • Humans have spent a lot of time analyzing sound
  • We already know what the important bits are in sound waves
  • We can just get the important bits and skip the deep learning
  • Then use a simple SVM to train

Step 4: LeArNinG

Step 4: LeArNinG

mfccs = np.mean(librosa.feature.mfcc(y=X, sr=sample_rate, n_mfcc=40).T,axis=0)
def algorithm_pipeline(X_train_data, X_test_data, y_train_data, y_test_data, 
                       model, param_grid, cv=10, scoring_fit='neg_mean_squared_error',
                       do_probabilities = False):
    gs = GridSearchCV(
        estimator=model,
        param_grid=param_grid, 
        cv=cv, 
        n_jobs=-1, 
        scoring=scoring_fit,
        verbose=3
    )
    fitted_model = gs.fit(X_train_data, y_train_data)
    
    if do_probabilities:
      pred = fitted_model.predict_proba(X_test_data)
    else:
      pred = fitted_model.predict(X_test_data)
    
    return fitted_model, pred

Step 4: LeArNinG

Deployment

Deployment

How to keep this from becoming the 598th piece of trash in an endless heap of failed, abandoned projects and misery

Deployment

They say he's doing an unprepared demo

Hackerspace: Doorbell

By Victor Sonck

Hackerspace: Doorbell

  • 36