HNHacker News
TopNewBestAskShowJobs

zerojames

3,625 karma · joined January 5, 2022

jamesg.blog.
submissionscomments
zerojames··on Show HN: I automated half of my typing
I _love_ to see projects like this.

I was working on a similar problem this weekend, but with whole words instead of abbreviations I had made in a dictionary, and in the general case, fine-tuned on any given corpus of text.

I wanted to know: could I write an autocorrect that is "fine-tuned" on a given corpus of text? Use case: I write a lot of docs with long phrases (i.e. "data augmentation"). Could I automate them?

I arrived at:

    1. Calculate "surprisal" of unigrams and bigrams (entropy) from a general dataset (an NYT corpus), give a boost to words in the "fine-tuned" index;
    2. Create a trie data structure that is weighed by surprisals. The more surprising a word, the more weight it gets.
    3. Use that as advanced autocomplete.
I got a working solution here: https://github.com/capjamesg/autowrite/blob/main/autocomplet...

(No docs yet -- coming in the next few days. Leave a GitHub Issue if you want to chat about it!)

zerojames··on Show HN: When Will I Run Out Of Money? (weekend project)
This is a cool project -- thanks for sharing! I am a _big fan_ of single-purpose web tools like this.

It would be nice if the bottom bar didn't change state if I am still typing a word (i.e. if I type "monthl", a red error shows up, then when I aadd the "y" the app shows the right state).

zerojames··on Show HN: How to Notebooks for computer vision models and techniques
Getting started with new and state-of-the-art vision models is often daunting. Documentation can be hard to parse, it can take a while to figure out how to run inference on an image.

We (the Roboflow open source team) actively write open source Google Colab notebooks showing how to use new SOTA models. Our library covers SAM, CLIP, Detectron2, YOLOv8, RTMDet, DINOv2, and more.

We also have code on common vision patterns like counting objects in a zone, vector analysis, object tracking with ByteTrack, and more.

I often turn to these notebooks as a quickstart both at work and for side projects when working with new model architectures: I can take the code I need and get to work solving a problem.

zerojames··on The Python dictionary dispatch pattern
YOLO is a model architecture in computer vision (You Only Look Once).

https://blog.roboflow.com/whats-new-in-yolov8/

In one example, dictionary dispatch decides what model to use: YOLOv5, v8, SAM, and others.

zerojames··on The Python dictionary dispatch pattern
Love this! Thank you for sharing (I'm the author).
zerojames··on Show HN: Going into freshman year, figured I should build an interpreter
I love this! Amazing work!
zerojames··on Hacker News Guidelines
Yes indeed! Dan, we sincerely appreciate the work you do nurture, moderate, and maintain the HN community!
zerojames··on Show HN: Pip install inference, open source computer vision deployment
I have added in a video showing inference into the README -- thank you for the feedback!
zerojames··on Show HN: Pip install inference, open source computer vision deployment
Thank you for your comment!

Inference is all about reducing the friction associated with deployment. Set up a Docker container (which works on a range of architectures, with TRT acceleration), load your model (or use SAM or CLIP, which come out of the box), then you can start sending HTTP requests to get predictions.

I'd love to know more about how we can improve the docs (I'm a big documentarian; feedback on docs is always sincerely appreciated).

zerojames··on Chandrayaan-3 Soft-landing [video]
Congratulations to India! Every time I read of launches to space, I think (and sometimes say aloud) "wow!" It is awesome in the traditional sense of the world.
zerojames··on Airport Pianos: Find Pianos in Airports
Can you remember what terminal it was in? I would love to add it!

Also, it's never too late to get back into piano! :)

zerojames··on Kullback–Leibler divergence
Yes indeed -- thank you! :facepalm:
zerojames··on Kullback–Leibler divergence
I have used KL-divergence in authorship verification: https://github.com/capjamesg/pysurprisal/blob/main/pysurpris...

My theory was: calculate entropy ("surprisal") of used words in a language (in my case, from an NYT corpus), then calculate KL-divergence between a given prose and a collection of surprisals for different authors. The author to whom the prose had the highest KL-divergence was assumed to be the author. I think it has been used in stylometry a bit.

zerojames··on Airport Pianos: Find Pianos in Airports
Thank you for the report! I have just pushed a fix! The code is open source, too; MIT licensed: https://github.com/capjamesg/airport-pianos

The list is at https://airportpianos.org/_data/airports.json.

A friend said he wanted to post the data to OpenStreetMap. I hope the data is syndicated to different places!

Edit: Fixed errant close bracket.

zerojames··on Airport Pianos: Find Pianos in Airports
Hello everyone! One of my favourite things to do is play piano in airports. The prospects of discovering, or being able to play, a piano brighten my mood when travelling.

That's why I made Airport Pianos, a site dedicated to pianos in airports. The site is text-focused and has a client-side search feature that you can use for planning an itinerary.

One of my favourite parts about this project is seeing submissions and data on Google Search Console about piano-related queries. It's so nice to see so many people out there looking for airport pianos; if you know of one, let me know!

My favourite airport piano? Maybe Chicago; really well maintained.

P.S. pianos.pub and www.worldpianos.org also have airport pianos listed!

zerojames··on Show HN: VisionScript, abstract programming language for computer vision
Thank you so much!

I have been thinking about learning progressions with a language like VisionScript. I see a notebook-like environment being a great place to start; dragging and dropping is intuitive (and fun!).

But if that notebook can introduce someone to the same primitives they can use in a text-based programming language? That gives you the ability to help someone graduate to a full programming environment.

Notebook -> Text that uses the same syntax as the notebook (you could drag+drop in the notebook then write out the text as a starting point!) -> Writing your own programs.

A friend suggested that the implicit state approach of VisionScript could be used in other areas too like audio. I reasoned that we could actually use many of the same primitive names and syntax; just a different backend. I don't know enough about audio processing, but the idea is fascinating!

zerojames··on Show HN: VisionScript, abstract programming language for computer vision
My pleasure! I sincerely appreciate your words! It was a pleasure to be on the front page of HN.
zerojames··on Show HN: VisionScript, abstract programming language for computer vision
VisionScript goes beyond OpenCV in terms of utilities, providing models for use out of the box.

To classify images, you can use Classify["class 1", "class 2", ...]; to run object detection you can use Detect["object"]; to run segmentation, use Segment["class"]. More abstract methods include Search[], that lets you build a semantic search engine in a few lines of code:

    Load["./folder/"]
    Search["coffee cup"]
    Get[1] # get the top result
    Show[]
I am aiming to encode best practices from computer vision behind the scenes (I work in the industry) to enable one to build powerful applications intuitively, with few lines of code!
zerojames··on Show HN: VisionScript, abstract programming language for computer vision
To the extent that VisionScript uses it behind the scenes for various things (i.e. counting objects in a zone https://github.com/capjamesg/visionscript/blob/main/visionsc...)!
zerojames··on Show HN: VisionScript, abstract programming language for computer vision
Thank you so much! Comments like this have really made my day.

Scratch does have an "Extensions" feature, so perhaps it would be possible (https://github.com/scratchfoundation/scratch-vm/blob/develop...)!

zerojames··on Show HN: VisionScript, abstract programming language for computer vision
Great question! Development has been guided by my asking myself -- and discussing with friends -- what problems I/we would like to solve (or what would be fun!), then building for those use cases. This is evident in the WIP DetectDistinctScenes[] method.

Example script:

    In["file.mov"]
        Classify["building", "garden"]
    Endin

    DetectDistinctFrames[]
This method is more advanced than most. It uses CLIP behind the scenes to detect when classifications change for more than N frames in a video, and generates a list of timestamps you can use to determine scene changes.

I'm keen to build more specific functions for common CV tasks. My code most certainly needs cleaned (the main lang.py is > 2k LOCs right now) but I do have a contributing guide that you can follow to add features should you be interested: https://github.com/capjamesg/visionscript/blob/main/CONTRIBU...

zerojames··on Show HN: VisionScript, abstract programming language for computer vision
I have been thinking about this! What would you like to be able to do?

On a separate note, one idea I had was to have rock paper scissors as a quickstart. You could Use["rock paper scissors"] to use that as a model; there could perhaps be a registry of curated, fun models that people can play with out of the box (aka ones good for classroom use).

zerojames··on Show HN: VisionScript, abstract programming language for computer vision
Thank you for your comment! Iteration is in the works right now.

I wrote this script at the weekend:

    Load["./bus.jpg"]

    In[Detect["person"]]
        Greyscale[]
    Endin

    Show[]
In[] is our iterator (which came from "in a folder", which was the original use). I'm adding data types. In the above program, In[] is iterating over a Detection object. Behind the scenes, each bounding box is selected, the nested statements (in this case, Greyscale[] are evaluated), then any transformations are applied to only the regions in the bounding box.

Thus the impact is:

    1. Load a file
    2. Find all the people
    3. For each person, turn that region greyscale
    4. Show the resulting image
My rationale for implicit state (I haven't heard that term until now -- thank you!) is that it may be more intuitive for a beginner. Maybe that will be wrong, but I'm eager to experiment!

(I am beyond elated to be on the front page of HN!)

(edited to get the code snippet and list formatting right!)

zerojames··on Ask HN: How could a programmer contribute to your industry?
I wish there were a way to “follow” a HN thread. I am very curious about this, too.
zerojames··on Ask HN: Could you share your personal blog here?
https://jamesg.blog
zerojames··on On the State of the Web
The IndieWeb is a nice corner of the web where you can find people with whom to chat about tech, the web, and many other things! https://indieweb.org/discuss
zerojames··on Cloud Appreciation Society
The NYT has a great long read on this organization: https://www.nytimes.com/2016/05/08/magazine/the-amateur-clou...
zerojames··on Show HN: LLaMA tokenizer that runs in browser
I love this sentiment! Amazing work!
zerojames··on Hacker New with Semafor UI
I really like this! How do you decide the positions of each post? What gets the center spot above the fold? The HN submission with the most upvotes?
zerojames··on Show HN: An RSS feed for the OpenAI blog
I have written a Python script to generate an RSS feed for the OpenAI blog. The script is open source (https://github.com/capjamesg/openai-blog-rss/blob/main/app.p...).

This script runs every five minutes, updating the feed to show all the posts currently on the first page of the OpenAI blog.

Contributions to enrich the markup are appreciated. The key points -- titles, dates, times -- are in the feed.

← PreviousPage 6 of 7Next →