Logical regression equation of ŷ

Hi, I have doubts regarding ŷ formula which is “y_pred = sigmoid(WtX + b)” .
I wanted to know how this formula is derived ?
How it works ?
Suppose for a cat image , what would be W^t and b.

Maybe review the lecture video [https://www.coursera.org/learn/neural-networks-deep-learning/lecture/tyAGh/computing-a-neural-networks-output]

The simplified representation starts at about 6:50 but watch the whole video if it isn’t clear how Prof Ng arrived at that point.