Skip to main content

Interactive 2D dataset sketching tool

Project description

DataPainter

DataPainter is an interactive tool for creating labeled 2D datasets by drawing directly on a grid. It is designed for quickly generating synthetic data for machine learning, visualization, and experimentation.

Features

  • Interactive drawing of data points using mouse
  • Multiple labeled classes with color coding
  • Adjustable brush size and point density
  • Real-time visualization on a 2D grid
  • Export dataset to CSV format
  • Supports up to 9 distinct labels
  • Lightweight and easy to use

Installation

pip install dataPainter

---------------------------------------------
from dataPainter import create2Ddata as cd2

cd2.create(
    x="x",
    y="y",
    x_range=[0, 100],
    y_range=[0, 100],
    labels=["ClassA", "ClassB", "ClassC"],
    filename="data.csv"
)
---------------------------------------------


Controls
Right Mouse Button: Draw points
Mouse Move: Continue drawing
Left Click: Select label
[ / ]: Decrease / Increase brush size
/ =: Decrease / Increase points per stroke
1–9: Switch labels
U: Undo last stroke
S: Save dataset to CSV
Q: Quit application
Output

The generated CSV file contains:

x coordinate
y coordinate
label

Example:

x,y,label
12.5,34.2,ClassA
45.1,78.9,ClassB
Requirements
Python 3.7+
OpenCV
NumPy
Use Cases
Creating synthetic datasets for machine learning
Teaching classification concepts
Rapid prototyping of models
Data visualization experiments
Limitations
Maximum of 9 labels (mapped to keys 1–9)
Desktop-only (OpenCV-based UI)
Future Improvements
GUI-based controls (dropdowns, sliders)
Web-based interface
Export formats beyond CSV
Dataset statistics panel
License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datapainter-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datapainter-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file datapainter-0.1.0.tar.gz.

File metadata

  • Download URL: datapainter-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for datapainter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4aa6e303ff5f8af5aee05e269481c88ec3f7a12b504a99d75027a6d220fbc384
MD5 a3d26ed95f9c058ec7c81f0212d98c4c
BLAKE2b-256 b0117149ad74bbbeae1cc5721cb7a54f3f3418d5b49b68a24c1a3b0da15f90c8

See more details on using hashes here.

File details

Details for the file datapainter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: datapainter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for datapainter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ae29ab470f6b37fbf2b3bafe2ccd784c8106ff726fd86e00f9d9cb25768a576
MD5 a5195cb7d0b4bbd5b4a86d48f293af97
BLAKE2b-256 dc0df4e1dbf5e757a2d5086cfc7982fbd77bafd97c515e5415e673e8724a900d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page