Processing live camera feed with torchscript in swift

Demo gif by Author

The future of computing involves computers that can see like we see. Phones recognize our faces, cameras read books, cars drive themselves. We will have only more of these.

It is hard not to be curious about how these algorithms work. For people like me, building is the best way to learn. In that endeavor I built an ios app around the hello world problem of computer vision. This post documents the conversations I had with my rubber duck while developing the app. The source code is available on github. I hope you find this useful.

My girlfriend is an alpha woman. She leads her life as she wishes. When she wants a vacation, she packs her bags and goes to South America, all by herself. She decides to take a PhD offer in the US, on a whim. Relocation to the other side of the ocean is an afternoon’s work for her. Even though it includes shipping her piano, snowboard and the bread maker.

She is the kind of woman you would ask for help when moving flats. For that reason I never challenged her to arm wrestling. But I had to follow her footsteps…

You can’t call it quits

Walking along a stretch of road, by the sunset.
Walking along a stretch of road, by the sunset.
Photo by Farid Askerov on Unsplash

The game has a rule: you can’t quit. Every player is allocated a time to play. During this period the player has to play. There is no other option. At the end of their term the game ends for the player. This is the only way out of the game.

The game doesn’t have a winner. It doesn’t have a loser. Nor does it have any sort of points to rank the players. This didn’t stop the players from inventing their own. They built scoreboards to virtually every level of the game.

There are many manufactured point systems in the…

In software engineering we love abstractions. They take care of the tedious details and allow us to put our attention where it belongs. However, there is value in understanding how they do what they do (take this advice from Joel). Following this guidance, I decided to tackle an embarrassingly long-standing gap in my knowledge; translating tcp packets into HTTP responses.

This post goes through the steps of writing an HTTP client similar to curl. The steps are;

  • Creating a socket
  • Establishing a tcp connection
  • Sending an http request
  • Reading the http response

The code examples in this post are in…

I spent one of my weekends playing a space simulation game. This game is no different than many other point and click games out there. What drew me into it was the theme around space exploration that I love. However that was not what kept me at it for more than twenty straight hours.

Game logo: Holy Potatoes, We’re in Space?!
Game logo: Holy Potatoes, We’re in Space?!

After a marathon of sitting in front of the screen I finished the game. Only at this point I was able to shake myself out of it and reflect on what I have been doing. From the perspective of an outsider I was doing nothing but…

Bora Tunca

Software engineer, reader, writer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store