{"id":17456104,"url":"https://github.com/debruine/webmorphr","last_synced_at":"2025-04-19T15:49:15.483Z","repository":{"id":38453615,"uuid":"357819230","full_name":"debruine/webmorphR","owner":"debruine","description":"Reproducible face stimuli","archived":false,"fork":false,"pushed_at":"2025-02-20T09:33:44.000Z","size":971187,"stargazers_count":14,"open_issues_count":10,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T12:39:34.565Z","etag":null,"topics":["faces","r"],"latest_commit_sha":null,"homepage":"https://debruine.github.io/webmorphR","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debruine.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":".zenodo.json"}},"created_at":"2021-04-14T07:47:17.000Z","updated_at":"2024-09-18T23:31:45.000Z","dependencies_parsed_at":"2025-04-14T12:49:48.675Z","dependency_job_id":null,"html_url":"https://github.com/debruine/webmorphR","commit_stats":{"total_commits":95,"total_committers":1,"mean_commits":95.0,"dds":0.0,"last_synced_commit":"f46a9c8e1f1b5ecd89e8ca68bb6378f83f2e41cb"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2FwebmorphR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2FwebmorphR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2FwebmorphR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debruine%2FwebmorphR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debruine","download_url":"https://codeload.github.com/debruine/webmorphR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249730641,"owners_count":21317327,"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":["faces","r"],"created_at":"2024-10-18T02:24:17.274Z","updated_at":"2025-04-19T15:49:15.462Z","avatar_url":"https://github.com/debruine.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/\",\n  out.width = \"100%\"\n)\n```\n\n# webmorphR ![](man/figures/logo.png){style=\"float:right; width:200px;\"}\n\n\u003c!-- badges: start --\u003e\n[![DOI](https://zenodo.org/badge/357819230.svg)](https://zenodo.org/badge/latestdoi/357819230)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![Codecov test coverage](https://codecov.io/gh/debruine/webmorphR/branch/master/graph/badge.svg)](https://app.codecov.io/gh/debruine/webmorphR?branch=master)\n[![R-CMD-check](https://github.com/debruine/webmorphR/workflows/R-CMD-check/badge.svg)](https://github.com/debruine/webmorphR/actions)\n\u003c!-- badges: end --\u003e\n\nThe goal of webmorphR is to make the construction of image stimuli more reproducible, with a focus on face stimuli. While face stimuli used in research can often not be shared for ethical reasons, webmorphR allows you to share recipes for creating stimuli with code, increasing reproducibility and encouraging generalisability to new faces.\n\nThis development of this package was funded by ERC grant #647910 (KINSHIP).\n\n## Installation\n\nYou can install webmorphR from CRAN with:\n\n``` r\ninstall_packages(\"webmorphR\")\n```\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"debruine/webmorphR\")\n```\n\n## Use\n\nThe code below produces the following figure reproducibly, and can be applied to any set of original images.\n\n![](man/figures/example.jpg)\n\nLoad images with [psychomorph/webmorph templates](https://debruine.github.io/webmorph/getting-started.html#delineate) or automatically delineate them. Use functions like `resize()`, `align()` and `crop()` to process the images reproducibly. Use webmorph functions to create composite or transformed faces. Use the plotting and labelling functions to create figures.\n\n```{r, eval = FALSE}\nlibrary(webmorphR)\n\n# load 6 images from the smiling demo set\n# devtools::install_github(\"debruine/webmorphR.stim\")\noriginal \u003c- webmorphR.stim::load_stim_smiling(\"002|013|030|064|094|099\") \n\n# resize and delineate the images (using Face++)\n# procrustes align and crop them to 80% size\nprocessed \u003c- original |\u003e\n  resize(0.5) |\u003e\n  auto_delin(smiling, model = \"fpp106\") |\u003e\n  align(procrustes = TRUE) |\u003e\n  crop(width = 0.8, height = 0.8, y_off = 0)\n\n# rename and save individual images\nprocessed |\u003e\n  rename_stim(prefix = \"aligned_\") |\u003e\n  write_stim(dir = \"stimuli/smiling\")\n\n# average faces (using webmorph.org)\navg \u003c- avg(processed)\n\n# combine individual faces in a grid the same height as the average face\ngrid \u003c- plot(processed, \n             ncol = 2, \n             external_pad = FALSE,\n             maxheight = height(avg))\n\n# draw template on the average face and add a label\ntem_viz \u003c- avg |\u003e\n  draw_tem() |\u003e\n  label(text = \"Composite with Template\",\n        size = 30, location = \"+0+10\")\n\n# combine the grid and tem_viz images and plot\nc(grid, tem_viz) |\u003e \n  plot(nrow = 1, maxwidth = 1500)\n```\n\n\n\n## Helper packages\n\nThere are also two helper packages that contain large demo stimulus files or functions that require python and dlib.\n\n``` r\ndevtools::install_github(\"debruine/webmorphR.stim\")\ndevtools::install_github(\"debruine/webmorphR.dlib\")\n```\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebruine%2Fwebmorphr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebruine%2Fwebmorphr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebruine%2Fwebmorphr/lists"}