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.5.tar.gz (8.2 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.5-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mnist_synthetic-0.0.5.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for mnist_synthetic-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4c86250c4cd524ee6a3e6a570384ed4d2c47de1d3a3fd70e420109a0b87001df
MD5 2bc45b4472e219841b4c49e9a6099288
BLAKE2b-256 20dfb12e9b9ec31ad0abd61bc1c703290a49543efce5cabab20314ed8d894b45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mnist_synthetic-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 53c261d1c481b599d6cdb470cc4281633ead4240d4b690fc64f14df2d6b74de1
MD5 f13c58b46e8437b2407d46fa60e561f9
BLAKE2b-256 e5bb6ae631df84ec6196011c110afd42c682990634c203bed88f52a009e38e90

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