Built With MongoDB: Vectorly

When Sam Bhattacharyya spent time in the Peace Corps as a teacher in Mexico, he learned how much of a barrier the lack of internet bandwidth was for his classes. The students simply did not have the resources needed to take advantage of online learning, which was a problem Sam soon became fixated on.

Years later, Sam founded his company Vectorly with a goal to fix that bandwidth issue via an AI-based video compression solution that streams low-resolution videos and turns them into a high-definition viewing experience.

Vectorly is a software development kit (SDK) that companies can integrate into their video applications. Vectorly released its minimal viable product (MVP) for use by early customers in February 2021 and has a total of 20 companies that are actively using the product.

In this edition of #BuiltWithMongoDB, we talked with Sam about how Vectorly’s software works, how he got started with MongoDB for Startups, and the future of this fast-growing industry.

MongoDB: What's Vectoryl's mission?

Sam: We’re building a technology that uses artificial intelligence (AI) to upscale and enhance video in real time on users’ devices, as they watch it. So, what that lets a user do is stream low-resolution video content and watch it in high definition.

We have about 100 AI models on our server. Most of them are for AI upscaling, for different kinds of content and different quality levels. Based on feedback from customers, we've also been building AI filters for, say, virtual background replacement.

All that data is loaded in real time from the server every time you load the library. With our SDK, you specify that you want to use this AI filter on that library, and you have an API token that calls our API and that returns the AI model in real time to your device so you can watch the upscaled video.

AI takes some computing power, which can be a concern especially on low-end devices, and we’re conscious of that, so we pay close attention to performance and frame rate to make sure our AI models do not overload the devices users are working on.

MongoDB: What are some of the use cases for Victory?

Sam: The first is to think of a user that is watching Netflix with a slow internet connection. Because the network is so slow, that user’s going to end up with a low-resolution version of the video. But we have AI filters that can pop in and start to upscale and enhance the video and make it look as if it’s high definition. The other use case is around video conferencing, where all kinds of things can affect call quality or user experience, from background noise to blurry video. You can use AI to correct any of those issues that come up.

MongoDB: What does your tech stack consist of?

Sam: Our product is a software library, which is for the web, and it’s all built in JavaScript. The main JavaScript functionality we’re using is called WebGL, which is a graphics pipeline that lets you access the GPU on devices. We have a bunch of AI models on our server, which are just numbers stored in JSON files. Our SDKs load the AI models in real time, and we use MongoDB to track and store event data, as well as basic metadata.

MongoDB: How did you choose MongoDB?

Sam: I've been using MongoDB since I started programming in 2012. Although the first programming course I took used the LAMP stack (Linux, Apache, MySQL, and PHP), SQL seemed unintuitive, and the LAMP stack in general just felt bulky.

When I started my first personal programming project, I looked for alternatives, and I found this new thing called the MEAN stack (MongoDB, Express.js, AngularJS, and Node.js). I thought it was the greatest thing in the world that you could use JavaScript in the front end and the back end, and that you could even use JSON like notation for the database. Having a full JavaScript stack made so much sense.

Every web development project I've started since has used the MEAN stack. When it came time to hack together the first version of Vectorly, MongoDB was our first choice for the database.

MongoDB: How has the experience been working with MongoDB?

Sam: It’s been fantastic. We had to come up with this model of tracking users and usage of our platform in a very short amount of time, because the first version we released had no tracking whatsoever. One of the things that saved us a lot of time was the MongoDB Charts function, because it really allows us to track what we’re doing. It was super quick to set up.

Looking to build something cool? Get started with the MongoDB for Startups program.