{"id":28995109,"url":"https://github.com/axiscommunications/blenderset-addon","last_synced_at":"2025-06-25T04:06:35.186Z","repository":{"id":77758042,"uuid":"532781799","full_name":"AxisCommunications/blenderset-addon","owner":"AxisCommunications","description":"Blenderset is tool for creating synthetic training data using blender. It can be used to create random scenes consisting of a real background image, ontop of which random humans and vehicles models are rendered with random lighting. In addition to the rendered images, annotations are generated in form of pixelwise instance-segmentations and bounding boxes.","archived":false,"fork":false,"pushed_at":"2025-02-05T08:45:00.000Z","size":10711,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-05T09:32:23.459Z","etag":null,"topics":["3d","blender","blender-addon","deep-learning","machine-learning","synthetic-data"],"latest_commit_sha":null,"homepage":"","language":"Python","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/AxisCommunications.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-09-05T07:03:02.000Z","updated_at":"2024-12-17T11:32:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"62572313-f91e-4317-adf9-3857ca68a130","html_url":"https://github.com/AxisCommunications/blenderset-addon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AxisCommunications/blenderset-addon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fblenderset-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fblenderset-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fblenderset-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fblenderset-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AxisCommunications","download_url":"https://codeload.github.com/AxisCommunications/blenderset-addon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AxisCommunications%2Fblenderset-addon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261801988,"owners_count":23211664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["3d","blender","blender-addon","deep-learning","machine-learning","synthetic-data"],"created_at":"2025-06-25T04:06:33.692Z","updated_at":"2025-06-25T04:06:35.156Z","avatar_url":"https://github.com/AxisCommunications.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blenderset\n\nBlenderset is tool for creating synthetic training data using blender. It can be used\nto create random scenes consisting of a real background image, ontop of which random\nhumans and vehicles models are rendered with random lighting. In addition to the\nrendered images, annotations are generated in form of pixelwise\ninstance-segmentations and bounding boxes. Here are a few example of images produced using blenderset:\n\n[![](example-images/office_realback_tumb.jpg)](example-images/office_realback.jpg)\n[![](example-images/fisheye_office_tumb.jpg)](example-images/fisheye_office.jpg)\n[![](example-images/nyhamnen_tumb.jpg)](example-images/nyhamnen.jpg)\n[![](example-images/real_highway_tumb.jpg)](example-images/real_highway.jpg)\n\n## Installation\n\n* Create a root directory and enter it: `mkdir blenderset; cd blenderset`\n* Clone the repo: `git clone https://github.com/AxisCommunications/blenderset-addon.git`\n* Create asset and metdata directories: `mkdir blenderset-assets blenderset-metadata`\n* Install system-wide dependencies: `sudo apt install libopenexr-dev libimath-dev libavcodec-dev libswscale-dev`\n* Make sure you have `ldconfig` in your path. If not: `sudo ln -s /sbin/ldconfig /usr/local/bin/`\n* Enter blenderset-addons `cd blenderset-addon`\n* Create and initialize virtual environment: `. ./init_env.sh` (you might have to make\n  sure that the file is executable with, for example `chmod 775 init_env.sh`)\n* Install dependencies: `make sync_env`.\n  Addons that crash will simply not show up in the GUI.\n  If some packages can't be installed you can install them manually by running\n  `sudo apt install apt-file` and then `sudo apt-file update`, and then you can seach for\n  the missing packages using `apt-file search xxx` where xxx is the missing package.\n  The missing package can then be installed by eg.\n  `sudo apt install libavcodec-dev`\n  `sudo apt install libswscale-dev`\n\nAddons that crash will simply not show up in the GUI.\n\n\n## Assets and Metadata\n\nTo use blender set custom assets and corresponding metadata are needed.\nDepending on what kind of scenes are to be rendered, different types of assets\nwill be needed. By default, blenderset will look for assets in the\n../blenderset-assets and ../blenderset-metadata directories. Some example metadata\nfor both free and paied asets are availible in example-assets and example-metadata,\nwhich can either be copied to the above dirs or a config file can be placed in\n`~/.config/blenderset/config.json` specifying which diretories to use. For example:\n\n```json\n{\n    \"metadata_dir\": \"/usr/local/src/blenderset/example-metadata\",\n    \"assets_dir\": \"/usr/local/src/blenderset/example-assets\"\n}\n```\n\n\n### Real Backgrounds\n\nEach background consist of:\n\n* A camera image of an empty scene\n* A camera model\n* A region of interest (ROI) defining where to place pedestrians\n* A set of tags used to filter out which backgrounds to use\n\nThese are specified in the `images_metadata.json` file. There is a helper script\n`poly_roi.py` that can be used to create the ROI coordinates:\n`python poly_roi.py --file image.jpg --roi-file roi.json`, which then needs to be\ncopied into `images_metadata.json`.\n\n\n### Synthetic Backgrounds\n\nInstead of using a real image as background, the ground plane can be textured with a\n downloaded material. Material can be found at for example\nhttps://polyhaven.com/textures. Select blender as format and unpack the downloaded\nzip-file in `example-assets/polyhaven`.\n\n\n### HDRI Lighting\n\nTo light the scene HDRIs are used. They can be found at for example\nhttps://polyhaven.com/hdris. Select format hdr and place the downloaded files in\n`example-assets/skys`.\n\n\n### Vehicles\n\nTo add vehicles to the scene, the comercial\n[Transportation Addon](https://blendermarket.com/products/transportation) from\nblender marked can be used. Install the addon manually and copy\n`~/.config/blender/3.2/scripts/addons/Tranportation/data` to\n`example-assets/Tranportation_data`. It's zip-fle can also be placed in\nthe `custom_addons` directory to be installed automatically during the normal\ninstallation processes.\n\n\n### Humans\n\nHuman 3D models can come either from Reallusion (Character Creator or Actorcore) or from BEDLAM.\n\n##### Reallusion\n\n3D models of humans can be created in\n[Reallusion Character Creator](https://www.reallusion.com/character-creator/)\nor downloaded from [Actorcore](https://actorcore.reallusion.com/). Export them into\nblender format and place them in\n`example-assets/Character_Creator_v3.41/BlenderCharacters256`, and add an entry to\n`example-metadata/character_metadata.json`.\nAlso, poses are needed\nthey can be extracted from animations downloaded from for example [Actorcore](https://actorcore.reallusion.com/).\nExport them to blender as `.fbx` and place the files in\n`example-assets/Character_Creator_v3.41/Animations/Avatar/\u003cavatar\u003e/`, where\n`\u003cavatar\u003e` is a string specifying which characters the animation can be applied to by\nlooking for the same string in the `avatar_base` property of the character metadata.\nThen import them using the `import_animation.py`,\nwhich can be called by `make import_animations`.\nThis will update the metadata in `animations_metadata.json` and convert the `.fbx`\nfiles into `.blend` files.\n\nTo try out the example `example-metadata/character_metadata.json` out of the box:\n\n* Create an account at [Actorcore](https://actorcore.reallusion.com/) and log in\n* \"Buy\" one or several of the free animations\n* Go to Inventory in the top right menu\n* Select \"Motion\" and the motion(s) to download and press \"Download\"\n* Select the \"Male Robot\", check \"Export motion only\" and press \"Next\"\n* Select \"Blender\" and press \"DOWNLOAD\"\n* Extrax the zip file and move the .fbx files into `example-assets/Character_Creator_v3.41/Animations/Avatar/MaleRobot/`\n* Run `make import_animations` in the blenderset-addon directory\n* \"Buy\" the two free Actors `Party_M_0001` and `Party_F_0001`\n* Go to Inventory in the top right menu\n* Select \"Actor\", enable \"Multiple Select\", chooce the two  actors and press \"Download\"\n* Move the two diretories `party-f-0001` and `party-m-0001` to example-assets/Character_Creator_v3.41/BlenderCharacters256/\n* Start blender with `make interactive`\n* Open the \"Synthetic\" tab on the right hand side of the 3D view\n* Press one of the 3 top \"Scenario\" buttions\n* If you want more Characters, press \"Create\" under \"Characters\"\n* To move the characters and alter the pose, press \"Update\" under \"Characters\"\n\n##### BEDLAM\n\nTo use human characters from the BEDLAM dataset, they need to be downloaded from the BEDLAM website manually an prepared:\n\n* Register and log into the [SMPL-X Download site](https://smpl-x.is.tue.mpg.de/download.php)\n* Download the [SMPL-X Blender Add-on](https://download.is.tue.mpg.de/download.php?domain=smplx\u0026sfile=smplx_blender_addon_300_20220623.zip)\n* Start an interactive session (`make interactive`) and install the addon manually. The zip-fle can also be placed in the `custom_addons` directory to be installed automatically during the normal installation processes.\n* Register and log into the [BEDLAM Download site](https://bedlam.is.tue.mpg.de/download.php).\n* Create a subdirectory called bedlam in the blenderset-assets directory created during installation.\n* Download the [SMPL-X gendered ground truth/animation files](https://download.is.tue.mpg.de/download.php?domain=bedlam\u0026resume=1\u0026sfile=bedlam_labels/gendered_ground_truth.zip) and unpack into the blenderset-assets/bedlam directory.\n* Create a subdirectory called blenderset-assets/bedlam/clothing\n* From the [Simulated clothing](https://bedlam.is.tue.mpg.de/clothingsim.php) page, download as many of the .tar archives with \"30 FPS abc (Alembic) files\" as you want and unpack in blenderset-assets/bedlam/clothing directory.\n* From the [Simulated clothing](https://bedlam.is.tue.mpg.de/clothingsim.php) page, download as many of the .tar archives with \"Clothing textures\" as you want and unpack in blenderset-assets/bedlam/clothing directory.\n* Download the [Body Textures](https://download.is.tue.mpg.de/download.php?domain=bedlam\u0026resume=1\u0026sfile=bedlam_body_textures_meshcapade.zip) and unpack in the blenderset-assets/bedlam directory.\n* Scale down the textures:\n```bash\n  cd blenderset-assets/bedlam/bedlam_body_textures_meshcapade\n  for d in $(find . -type d); do\n      mkdir -p ../bedlam_body_textures_meshcapade_512/$d\n      mogrify -resize 512x512 -path ../bedlam_body_textures_meshcapade_512/$d $d/*\n  done\n```\n\n* A minimal setup could consist of the following directory structure:\n```\n    blenderset-assets/\n    blenderset-assets/bedlam\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/eye\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/eye/SMPLX_eye.png\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/female\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/female/skin\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/female/skin/skin_f_african_01_ALB.png\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/male\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/male/skin\n    blenderset-assets/bedlam/bedlam_body_textures_meshcapade_512/smpl/MC_texture_skintones/male/skin/skin_m_asian_04_ALB.png\n    blenderset-assets/bedlam/clothing\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_simulations\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_simulations/1095\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_simulations/1095/1095.abc\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_textures\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_textures/texture_01\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_textures/texture_01/texture_01_normal_1001.png\n    blenderset-assets/bedlam/clothing/rp_aaron_posed_009/clothing_textures/texture_01/texture_01_diffuse_1001.png\n    blenderset-assets/bedlam/gendered_ground_truth\n    blenderset-assets/bedlam/gendered_ground_truth/rp_aaron_posed_009\n    blenderset-assets/bedlam/gendered_ground_truth/rp_aaron_posed_009/moving_body_para\n    blenderset-assets/bedlam/gendered_ground_truth/rp_aaron_posed_009/moving_body_para/1095\n    blenderset-assets/bedlam/gendered_ground_truth/rp_aaron_posed_009/moving_body_para/1095/motion_seq.npz\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fblenderset-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiscommunications%2Fblenderset-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiscommunications%2Fblenderset-addon/lists"}