Algorithm for Brand recognition in images [on hold]

I know that this is a highly subjective and use case varied question, but Im just looking for a push in the right direction.

How would one go about implementing a brand recognition algorithm in images.

e.g. I take a photo with my phone of a macbook and it recognizes that its a macbook (ideally it would also be able to determine the actual model of the computer) or I take a picture of headphones and the algorithm outputs that those headphones are Sony model xx-100 (ideally it should be possible to do that with boxed and unboxed items).

So my question is: 1) Is this even possible? 2) If yes, where would one start in implementing this? (Im not asking for step by step instructions just a general outline)

Thanks in advance, and I apologise if this question doesnt really follow the rules of this forum.