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, config=config)

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.6.tar.gz (8.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.6-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mnist_synthetic-0.0.6.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.12 Darwin/23.6.0

File hashes

Hashes for mnist_synthetic-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1be53570cc23ce5351778b50b4d4cbd10f17bcf5260b87320ecf7cc99147d34f
MD5 56f3b6aa2dcb078f98f34b29058cef5b
BLAKE2b-256 6969c65da6a1c82be93801bb61acf2bdd8eb4867f5a5717d522b534c2bb3590f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mnist_synthetic-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.10.12 Darwin/23.6.0

File hashes

Hashes for mnist_synthetic-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fcaff24d1a8c0da12dbcf53c015e0a12375af9d664d5af9cf38f5288513988ee
MD5 e2f189ec966c51c59ad691bfed129612
BLAKE2b-256 83ec00090bc4cb36899d0ccd37f23204fc53a9bc3a7b4d1fb05530bf17adb732

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