background-shape
feature-image

Table of Contents


πŸ‘‹ Introduction

On October 28th, 2024 I made it to GitHub Trending! This wasn’t something I expected to happen, and I’m still in disbelief.

GitHub Trending Developer for 28th October 2024

GitHub Trending Developer for 28th October 2024

But after all the dopamine rush, I’m back to reality and I want to share my journey on how I made it.

This is mostly a note to myself and I hope it can help you too.

πŸš€ The Project

I created an open source repository called x.infer. It’s a framework agnostic computer vision inference library. I created this to solve my problem of using difference computer vision frameworks without the hassle of rewriting the inference code.

Check out the project here

With x.infer you can load any model from different frameworks and use them with a unified API.

import xinfer

model = xinfer.create_model("vikhyatk/moondream2")
model.infer(image, prompt)         # Run single inference
model.infer_batch(images, prompts) # Run batch inference
model.launch_gradio()              # Launch Gradio interface

It already has support for many popular models and frameworks like Transformers, vLLM, Ollama, Ultralytics, etc. Combined it’s over 1000 models that you can use with the above 4 lines of code.

First a disclaimer, I think that building a project with the goal of getting it trending is NOT a good starting point. Anchoring your project on an extrinsic reward (getting trending) will not make you happier in the long run and you’ll likely to give up when things are tough.

Instead, start with a goal that is much bigger.

Start with a goal to solve a problem, learn something, or build something that you’re passionate about. This will push you to work on your project for a longer without getting discouraged.

Now let’s talk about how I did it.

🎯 Solving a Pain Point

The first step to getting your project trending is to solve a pain point. This is not something that you’ll know immediately.

But over time, you’ll start to notice some patterns. For me, one pattern emerged, there are many frameworks, and each framework has its own way of loading the model, inference, and post-processing, etc.

Every time I change framework, I have to rewrite the inference code. This is really annoying.

Putting this into a single unified API would be super useful.

πŸ“ The README File

This is probably the most important part of the project aside from solving a pain point.

Nobody would know about what pain point you’re solving if you don’t tell them in a way that’s easy to understand.

I spent a good amount of time writing the README file. I wanted to make sure that it’s easy to understand and that it showcases the project’s value proposition.

At the very top, I included 4 things:

  1. Shields.io badges to showcase the project’s popularity and features.
  2. Simple logo and a short description of what the project does.
  3. A GIF to showcase the project’s value proposition.
  4. Quick links.

This is the first thing people see when they visit the project. It’s important to make it good. Like it or not, people judge a book by its cover. So make it good.

This also conveys that you’re serious about your project.

πŸŽ₯ The Demo Video

To support the README file, I also created a demo video to showcase the project. This made it even clearer to understand what the project does.

People are visual creatures they said and I find this to be true. And also visuals convey more information than words and in a shorter time.

πŸ‘₯ The Community

I did not post about this project on social media in one go. Instead I posted about it in a niche community to get some initial feedback.

I posted on Reddit and got some good feedback.

x.infer - Framework agnostic computer vision inference.
byu/WatercressTraining incomputervision