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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mnist_synthetic-0.0.2.tar.gz
  • Upload date:
  • Size: 6.8 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.2.tar.gz
Algorithm Hash digest
SHA256 ab3c93c5e6cadaa2317bfccf5fba33f61675e2f5f190b65612680fd924f41acf
MD5 9d145e7b8d6a4ff94671b7ffd69add80
BLAKE2b-256 3ba00239e0fde3cd15390022ee0af0a712f7ee6269f9ae31c63947d41e920105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mnist_synthetic-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a17ee4955744f3a666d9038f19ef40e9e839c3dec90c0fc3f6073cc194b2ef4d
MD5 3242bbc1cce176ce19f62a36878d5c82
BLAKE2b-256 43f8e497202ffa1bea941780264b6431bd4ac681ede5084ce91a19cbbe58d7ef

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