Text-cli - Command line tool for extracting text from images using Apple's Vision framework

Overview

text-cli

Command line tool for extracting text from images using Apple's Vision framework.

text-cli is kind of a dumb name but I didn't actually think I would finish it on the first go and now it's the end of the day. This tool (and package) will probably be renamed.

Important

This tool requires Mac OS 10.15 or higher.

Example

Both of the images in these examples are included in the fixtures directory.

$> swift build

https://collection.sfomuseum.org/objects/1762939445/

$> ./.build/debug/text-cli ./fixtures/sfomuseum-pin-2019.081.021.jpg 
SANDY HERRMANN

https://collection.sfomuseum.org/objects/1511924565/

$> ./.build/debug/text-cli ./fixtures/sfomuseum-menu-2000.058.1457.jpg 
GUAM
WAKE -GUAM
LUNCHEON
Entrées
Cold Luncheon Buffet of Lobster Bellevue, Beef Wellington and Smoked Breast of Turkey
Salad a la Russe or Waldorf Salad
A Selection of Luncheon Breads
Desserts
Fruit Flavored Ice Cream Served with Gaufrettes
proute Guam. Captain Musick radioed from the flight deck,
Assorted Fresh Fruit and French Pastries
Everything was functioning perfectly and the China Clipper
settled down to the long .500-r drive ahead. The cloud
International Coffee
moisture on the wings flashed every color of the spectrum and
Café Parisienne
Café Royale
Irish Coffee
the propellers described great glistening arcs as we sped ahead
with Grand Marier
Collee and Cognac
with Baileys Irish Cream
a world al to ourselves - except for the nine radio stations and the three
radio compass stations that kept their invisible fingers on us.
Italian Coffee
Café Mexicano
with Amaretto di Saronno
The China Clipper crossed the International Date Line and arrived in
Coffee and Kahlua
Guam 45 minutes ahead of schedule. After a day of rest and Thanksgiving
Cappuccino
dinner at the Governor's Palace, the crew of the China Clipper was ready
with Chocola
to embark on the final leg of their journey.
/ Cognac

https://collection.sfomuseum.org/objects/1729564805/

$> ./.build/debug/text-cli ./fixtures/sfomuseum-clip-2011.058.005.jpg 
ABOUT YOUR
NAPKIN CLIP...
We designed your napkin so you
can attach it easily to the neckline
of your clothes. Before fixing it in
position, all you need do is push
the narrow end of this clip
through the buttonhole in one
corner of the napkin. (See
illustrations.)
QANTAS
You will find this clip has a
myriad of personal uses. For
instance, makes an ideal hanger
for clothes when hooked at the
top of a car window.

See also

You might also like...
A framework for building fast genetic algorithms in Swift.
A framework for building fast genetic algorithms in Swift.

Revolver is a framework for building fast genetic algorithms in Swift 3.0. Features Chromosomes: strings, trees Genetic operators: reproduction, mutat

Realtime yoga pose detection and classification plugin for Flutter using MLKit

ML Kit Pose Detection Plugin Flutter plugin for realtime pose detection using MLKit's Blazepose. License Copyright (c) 2021 Souvik Biswas, Bharat Bira

Sample code for Core ML using ResNet50 provided by Apple and a custom model generated by coremltools.
Sample code for Core ML using ResNet50 provided by Apple and a custom model generated by coremltools.

CoreML-samples This is the sample code for Core ML using ResNet50 provided by Apple. ResNet50 can categorize the input image to 1000 pre-trained categ

Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks
Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks

mtcnn-caffe Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks. This project provide you a method to update mu

Automatic spoken language identification (LID) using deep learning.

iLID Automatic spoken language identification (LID) using deep learning. Motivation We wanted to classify the spoken language within audio files, a pr

Automatic colorization using deep neural networks. Colorful Image Colorization. In ECCV, 2016.
Automatic colorization using deep neural networks. Colorful Image Colorization. In ECCV, 2016.

Colorful Image Colorization [Project Page] Richard Zhang, Phillip Isola, Alexei A. Efros. In ECCV, 2016. + automatic colorization functionality for Re

Hand-gesture recognition on iOS app using CoreML
Hand-gesture recognition on iOS app using CoreML

GestureAI-CoreML-iOS Hand-gesture recognizer using CoreML Demo Screenshots This app is using RNN(Recurrent Neural network) with CoreML on iOS11. The m

An example of CoreML using a pre-trained VGG16 model

CoreMLExample In this example we use AVFoundation to continuously get image data from the back camera, and try to detect the dominant objects present

🐵Fooling around with Apples private framework AvatarKit
🐵Fooling around with Apples private framework AvatarKit

Fooling around with Apples private framework AvatarKit, the framework used in Messages.app for recording Animoji videos. If you are looking to create your own Animoji, take a look at SBSCustomAnimoji.

Simple command-line utility for performing OCR using Apple's Vision framework

ocrit Runs Vision's OCR on input images and outputs corresponding txt files for each image, or writes the recognized results to standard output. USAGE

DYLDExtractor  - Packed tool for extracting frameworks and libraries from iOS dyld shared cache.
DYLDExtractor - Packed tool for extracting frameworks and libraries from iOS dyld shared cache.

DYLDExtractor is a tool wrapping around the dsc_extractor.bundle calling dyld_shared_cache_extract_dylibs_progress to get frameworks and libraries extracted from iOS dyld shared cache.

Swift-cli - Example of building command-line tools in Swift
Swift-cli - Example of building command-line tools in Swift

swift-cli Example of building command-line tools in Swift Step 1: Create CLI wit

Vision Camera 📸 The Camera library that sees the vision.
Vision Camera 📸 The Camera library that sees the vision.

Vision Camera 📸 The Camera library that sees the vision. npm i react-native-vision-camera npx pod-install Documentation Guides API Ex

A simple deep learning library for estimating a set of tags and extracting semantic feature vectors from given illustrations.
A simple deep learning library for estimating a set of tags and extracting semantic feature vectors from given illustrations.

Illustration2Vec illustration2vec (i2v) is a simple library for estimating a set of tags and extracting semantic feature vectors from given illustrati

A simple macOS app to read code from images, written purely in Swift using Vision Framework.
A simple macOS app to read code from images, written purely in Swift using Vision Framework.

CodeReader A simple macOS app to read code from images, written purely in Swift using Vision Framework. Usage Drag an image Click the convert button R

The repository for a command line / build pipeline tool for generating colors from a human-readable text file that designers can also use.

ColorPaletteGenerator ColorPaletteGenerator is a tool that takes a human-readable input file describing a color palette, and generates the associated

An adorable little framework and command line tool for interacting with SourceKit.

SourceKitten An adorable little framework and command line tool for interacting with SourceKit. SourceKitten links and communicates with sourcekitd.fr

Mac App Store: Embedding a Command Line tool using paths as arguments

Mac App Store: Embedding a Command Line tool using paths as arguments Code snippets to embed a Command Line tool using paths as arguments on the Mac A

Command line tool for exporting resources and generating code from your Figma files
Command line tool for exporting resources and generating code from your Figma files

Fugen Fugen is a command line tool for exporting resources and generating code from your Figma files. Currently, Fugen supports the following entities

Comments
  • Support multipage PDFs

    Support multipage PDFs

    Multipage PDF support would be a game changer for me. In a Node script I'm writing, I have to split PDFs into individual images and run the OCR utility over each page. This introduces a fair amount of hanging while my computer has to render each page in the background before passing it to text-cli.

    opened by samhenrigold 1
Owner
San Francisco International Airport Museum
San Francisco International Airport Museum
British Machine Vision Conference (BMVC)

Introduction This repository contains the model files, solver definitions, and learned weights for the networks described in the following publication

Scott Workman 34 Sep 6, 2022
CLI for AMDRyzenCPUPowerManagement that reads wattage, temperature and frequencies

amd-cpu-data A very small application to talk to the "AMDRyzenCPUPowerManagement" kext for getting CPU wattage, temperature and frequency. Is more or

Bror 2 Nov 1, 2022
This is an open-source project for the aesthetic evaluation of images based on the deep learning-caffe framework, which we completed in the Victory team of Besti.

This is an open-source project for the aesthetic evaluation of images based on the deep learning-caffe framework, which we completed in the Victory team of Besti.

The Victory Group of Besti 102 Dec 15, 2022
WhatPet - A basic app that classifies images of dogs, cats and rabbits using CoreML

WhatPet ✓ A basic app that classifies images of dogs, cats and rabbits using Cor

Micaella Morales 0 Jan 6, 2022
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)

Detecting Text in Natural Image with Connectionist Text Proposal Network The codes are used for implementing CTPN for scene text detection, described

Tian Zhi 1.3k Dec 22, 2022
👀 iOS11 demo application for age and gender classification of facial images.

Faces Vision Demo iOS11 demo application for age and gender classification of facial images using Vision and CoreML. Model This demo is based on the a

Cocoa AI 300 Dec 9, 2022
Tool to convert SVG to SwiftUI's Shape structure.

SVG to SwiftUI Converter Tool to convert SVG to SwiftUI's Shape structure. This approach is much more memory efficient than introducing a SVG library

Quassum Manus 487 Jan 8, 2023
Tiny YOLO for iOS implemented using CoreML but also using the new MPS graph API.

YOLO with Core ML and MPSNNGraph This is the source code for my blog post YOLO: Core ML versus MPSNNGraph. YOLO is an object detection network. It can

Matthijs Hollemans 900 Dec 31, 2022
BrainCore is a simple but fast neural network framework written in Swift.

BrainCore is a simple but fast neural network framework written in Swift. It uses Metal which makes it screamin' fast. If you want to see it

Alejandro Isaza 377 Jun 29, 2022
MLKit is a simple machine learning framework written in Swift.

MLKit (a.k.a Machine Learning Kit) ?? MLKit is a simple machine learning framework written in Swift. Currently MLKit features machine learning algorit

Guled 152 Nov 17, 2022