Skip to main content

No project description provided

Project description

MNIST Synthetic

The library for digits generations (like MNIST). The default size of images is 28x28.

generated_rotate_numbers.png

Number Generation

You can use default settings, or configurate generated number use GeneratorConfig.

from mnist_synthetic.generator import NumbersGenerator
from mnist_synthetic.config import GeneratorConfig

config: GeneratorConfig = GeneratorConfig()
generator = NumbersGenerator(seed=None, )

To generate number it's enough to run method

img, label = generator.generate_0()

To generate random number call just generate:

img, label = generator.generate()

Datasets

To run it:

from matplotlib import pyplot as plt
from mnist_synthetic.torch.datasets import MNISTSynthetic

dataset = MNISTSynthetic(10, seed=42)

fig, axes = plt.subplots(1, 10, figsize=(10, 4))
for i, ax in enumerate(axes):
    ax.imshow(dataset[i][0], cmap='gray')
    ax.axis('off')
    ax.set_label(str(dataset[i][1]))

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

mnist_synthetic-0.0.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

mnist_synthetic-0.0.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file mnist_synthetic-0.0.1.tar.gz.

File metadata

  • Download URL: mnist_synthetic-0.0.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for mnist_synthetic-0.0.1.tar.gz
Algorithm Hash digest
SHA256 de0334fb383ba270b86bae652a61a6c32cc491cbd1f694a88824c48f4f3ffe33
MD5 0232db7c16f625d06373a03d1e0900cb
BLAKE2b-256 38d137ed9d49ac333dc59788c72efc532cdee0e75b06ab9c50bebcdd1c451e03

See more details on using hashes here.

File details

Details for the file mnist_synthetic-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mnist_synthetic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa5adeb620ea6221657faa696efa6e29c46415be1410461886d7c27527d852a
MD5 7ee1729b2fde19cd3ece642c87799746
BLAKE2b-256 07ccbe4cb2c67cea45ad4beb057cce6da5539c94cb17382208be8b2df5ca2429

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