Skip to content

kustcn/x-labeler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XLabeler

A web app for labeling images along X-axis.

Demo

Features

  • Label images in X-axis
  • Multi-label support
  • Directory structure tree view
  • ‌Local deployment, no image upload required

Requirements

  • Python 3.9+
  • Node.js 14+

Installation

  1. Clone the repository
  2. Install dependencies:
pip install -r requirements.txt

Configuration

The server can be configured using environment variables in a .env file:

  • BASE_DIR: Set the base directory for file system operations (defaults to the project root directory)

Compile Web Assets

cd web
npm install
npm run build

Running the Server

Start the server with:

python main.py

Or use uvicorn directly:

uvicorn main:app --reload --host 0.0.0.0 --port 8000

API Documentation

Once the server is running, you can access:

API Endpoints

Label Endpoints

  • GET /api/labels/file - Get the related labels of a file
  • POST /api/labels/file - Create a new labels for a file
  • GET /api/labels/files - Get all labels from a directory

File System Endpoints

  • GET /api/fs/tree - Get directories structure
  • GET /api/fs/files: Get all images files in the directory
  • GET /api/fs/file/{file_path}: Return the file content

About

A web app for handling label images in X-axis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors