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.4.tar.gz (6.9 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.4-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mnist_synthetic-0.0.4.tar.gz
  • Upload date:
  • Size: 6.9 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.4.tar.gz
Algorithm Hash digest
SHA256 9da50140489ebde807fdb1e8be51790b12a2c1d98ea22d856d16036189b51c89
MD5 4468eca98922ea6311824e10fade8c43
BLAKE2b-256 a0598ce5c05ccb0b78eaf19dea617fa3be2ab0048cd508856345ffd3d04dc348

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mnist_synthetic-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 47d321b44a50f7f5ed28d2c8cfebb935815178eb5e35fece65221a26ceaf22d1
MD5 f30ced4895d4908c8ce832e4f1942662
BLAKE2b-256 db7286c8b674bbc823be78afcaf4d1a7b9be31d73eeb72a8d6ed6e09108704ff

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