
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
image-classifier-ts
Advanced tools
Command line tool to auto-classify images, renaming them with appropriate labels. Uses Node and Google Vision API.
Command line tool to auto-classify images, renaming them with appropriate address and labels. Uses Node.js and the Google Geocoding and Vision APIs.
image-classifier-ts is stable, with ongoing development (tested on Windows, Ubuntu Linux) following semantic versioning.
The project was started as a way to avoid depending on particular photo software such as Picasa, and also to save time spent on sorting tons of photos!
We use sharp
to resize images during processing. sharp
requires
node-gyp to build, so you will need to
install
Microsoft's windows-build-tools
using this command:
npm install --global --production windows-build-tools
note: the processed images will be moved to the output directory. so you may want to point 'input directory' to a copy of your images directory.
You can run image-classifier-ts
in one of three ways:
npm i -g image-classifier-ts@latest --production
on Ubuntu, you may need administrator permissions via sudo
:
sudo npm i -g image-classifier-ts@latest --production
To use:
image-classifier-ts <path to image directory> <path to output directory> [-filenameFormat=<file name format>]
Install inside your npm project:
yarn add image-classifier-ts
via bash script:
node_modules/image-classifier-ts/dist/lib/cli.js <input directory> <output directory>
OR via node:
node node_modules/image-classifier-ts/dist/lib/main <input directory> <output directory>
yarn
On Windows: use a bash shell like git bash
.
To test your installation:
./test.sh
To classify your images:
./go.sh <path to image directory> <path to output directory> [-filenameFormat=<file name format>]
example:
./go.sh ../myPhotos ../myPhotos-labelled
To have a 'dry run' where the images are not actually moved, use the 'dryRun' option:
./go.sh ../myPhotos ../myPhotos-labelled -dryRun
To see more detailed usage info:
./go.sh
./go.sh ../my-photos -filenameFormat={year}/{location}/{topLabel}/{combinedLabels}-{fileSizeMb}-{width}x{height}--{filename}
You can specify locations for the photos, by date.
Do this by adding a file named mapDateToLocation.csv
in the same folder as your images.
The approprite location description will be used when renaming the image files.
For an example, see mapDateToLocation.csv
note: if the location is unknown, and the filename format includes {location}
, then the image will NOT be moved.
Install inside your npm project:
yarn add image-classifier-ts
Then in TypeScript, you can import the library:
import * as ic from "image-classifier-ts";
For a working example, see the library test harness.
site | URL |
---|---|
source code (github) | https://github.com/mrseanryan/image-classifier-ts |
github page | https://mrseanryan.github.io/image-classifier-ts/ |
npm | https://www.npmjs.com/package/image-classifier-ts |
see the contributing readme.
This project is based on the excellent seeder project typescript-library-starter.
image-classifier-ts uses the ExifReader library.
Original work by Sean Ryan - mr.sean.ryan(at gmail.com)
This project is licensed under the MIT License - see the LICENSE file for details
FAQs
Command line tool to auto-classify images, renaming them with appropriate labels. Uses Node and Google Vision API.
The npm package image-classifier-ts receives a total of 12 weekly downloads. As such, image-classifier-ts popularity was classified as not popular.
We found that image-classifier-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.