{"id":16832395,"url":"https://github.com/yanndubs/overlayed-datasets","last_synced_at":"2026-05-18T08:32:19.813Z","repository":{"id":87932961,"uuid":"212737235","full_name":"YannDubs/Overlayed-Datasets","owner":"YannDubs","description":"Code for generating datasets consisting of overlayed images.","archived":false,"fork":false,"pushed_at":"2019-10-07T18:46:55.000Z","size":488,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T00:52:30.190Z","etag":null,"topics":["classification","computer-vision","datasets","occlusion","overlay","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YannDubs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-04T04:43:36.000Z","updated_at":"2023-07-25T14:29:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c8e5c2d-29c4-4b70-9297-5e5741d75897","html_url":"https://github.com/YannDubs/Overlayed-Datasets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YannDubs/Overlayed-Datasets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YannDubs%2FOverlayed-Datasets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YannDubs%2FOverlayed-Datasets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YannDubs%2FOverlayed-Datasets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YannDubs%2FOverlayed-Datasets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YannDubs","download_url":"https://codeload.github.com/YannDubs/Overlayed-Datasets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YannDubs%2FOverlayed-Datasets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33170836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","computer-vision","datasets","occlusion","overlay","python"],"created_at":"2024-10-13T11:48:49.261Z","updated_at":"2026-05-18T08:32:19.797Z","avatar_url":"https://github.com/YannDubs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overlayed-Datasets\nDatasets consisting of overlayed images. The idea of overlaying datasets came after reading [Information Dropout](https://arxiv.org/abs/1611.01353).\n\n\n## Use Precomputed datasets\n2 precomputed datasets can be found in `data/` (the images, labels, and distracting - overlayed - labels), namely `CIFAR10 + MNIST` and `MNIST + OMNIGLOT`. Here are some examples for both of these:\n\n![CIFAR10 + MNIST](imgs/cifar10_mnist.png)\n\n![MNIST + OMNIGLOT](imgs/mnist_omniglot.png)\n\nThe first label is the real (background), while the second corresponds to the distractor (overlayed) label.\nThe code to generate those, and examples with additional arguments can be found [examples.ipynb](/examples.ipynb).\n\n## Generate Your Own\nTo generate your own, you need `overlay_img` (or the wrapper `overlay_save_datasets` if you directly want to save it).\nThe main documentation is in the following docstring:\n\n```python\ndef overlay_img(bckgrnd, to_overlay, is_shift=False, seed=123):\n    \"\"\"Overlays an image with black background `to_overlay` on a `bckgrnd`\n    \n    Parameters\n    ----------\n    bckgrnd : np.array, shape=[n_bckgrnd, height_bckgrnd, width_bckgrnd, ...], dtype=uint8\n        Background images. Each image will have one random image from  `to_overlay` overlayed on it.\n    \n    to_overlay : np.array, shape=[n_overlay, height_overlay, width_overlay, ...], dtype=uint8\n        Images to overlay. Currently the following assumptions are made:\n            - the overlaid images have to be at most as big as the background ones (i.e. \n              `height_bckgrnd \u003c= height_bckgrnd` and `\u003c= width_bckgrnd`).\n            - The overlayed images are also used as mask. This is especially good for black \n              and white images : whiter pixels (~1) are the ones to be overlayed. In the case\n              of colored image, this still hold but channel wise.\n\n    is_shift : bool, optional\n        Whether to randomly shift all overlayed images or to keep them on the bottom right.\n        \n    seed : int, optional\n        Pseudo random seed.\n        \n    Return\n    ------\n    imgs : np.array, shape=[n_bckgrnd, height, width, 3], dtype=uint8\n        Overlayed images.\n        \n    selected : np.array, shape=[n_bckgrnd], dtype=int64\n        Indices of the slected overlayed images.\n    \"\"\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanndubs%2Foverlayed-datasets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanndubs%2Foverlayed-datasets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanndubs%2Foverlayed-datasets/lists"}