Package: transforEmotion 0.1.9

transforEmotion: Transformer Emotion Analysis for Text, Image, Video, and Speech

Zero-shot emotion classification for text, images, video and speech, and tools to find faces and code them by hand. Text is scored with 'Hugging Face' transformer pipelines (default 'cross-encoder/nli-distilroberta-base'). Images and video are scored with 'OpenAI CLIP'; faces can be limited to those found by 'OpenCV YuNet'. Speech segments are scored with 'LAION CLAP'. Frame scores can be calibrated and combined into posteriors, and detected faces or other items can be turned into a local coding task served from R. Any other zero-shot model can be selected by its name on <https://huggingface.co/models>. For details see Tomašević, Golino, and Christensen (2026) <doi:10.5117/CCR2026.2.2.TOMA>.

Authors:Alexander Christensen [aut], Hudson Golino [aut], Aleksandar Tomašević [aut, cre]

transforEmotion_0.1.9.tar.gz
transforEmotion_0.1.9.zip(r-4.7-any)transforEmotion_0.1.9.zip(r-4.6-any)transforEmotion_0.1.9.zip(r-4.5-any)
transforEmotion_0.1.9.tgz(r-4.6-any)transforEmotion_0.1.9.tgz(r-4.5-any)
transforEmotion_0.1.9.tar.gz(r-4.7-any)transforEmotion_0.1.9.tar.gz(r-4.6-any)
transforEmotion_0.1.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
transforEmotion/json (API)

# Install 'transforEmotion' in R:
install.packages('transforEmotion', repos = c('https://atomashevic.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/atomashevic/transforemotion/issues

Datasets:

On CRAN:

Conda:

8.12 score 39 stars 56 scripts 537 downloads 58 exports 67 dependencies

Last updated from:0b684247fd. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK203
source / vignettesOK324
linux-releaseOK325
macos-releaseOK194
macos-oldrelOK168
windows-develOK130
windows-releaseOK374
windows-oldrelOK155
wasm-releaseOK294

Exports:.init_builtin_modelsadd_vision_modelannotate_facesannotation_agreementannotation_progressannotation_questionsannotation_taskas_rag_tablecalibrate_scorescheck_findingemo_qualityconsensus_labelsdelete_transformerdetect_facesdlo_dynamicsdownload_findingemo_datadraw_facesemoxicon_scoresevaluate_emotionsface_scoresget_vision_model_configimage_scoresimage_scores_diris_vision_model_registeredlist_vision_modelsload_findingemo_annotationsmap_discrete_to_vadmap_to_emo8nlp_scoresparse_rag_jsonplot_sim_emotionsposterior_scoresprepare_findingemo_evaluationpunctuatepython_requirementsragrag_sentemoread_annotationsread_face_selectionregister_retrieverregister_vision_modelremove_vision_modelselect_facessentence_similaritysetup_cachesetup_gpu_modulessetup_minicondasetup_modulessetup_popular_modelsshow_vision_modelssimulate_videospeech_scoreste_cleanup_default_venvtransformer_scoresvad_scoresvalidate_rag_jsonvalidate_rag_predictionsvideo_scoresview_faces

Dependencies:askpassbitbit64clicliprcpp11crayoncurldplyrfarverfastmapfsgarglegenericsggplot2gluegoogledrivegtableherehmshttpuvhttrisobandjsonlitelabelinglaterlatticelifecyclemagrittrMatrixmimeopensslotelpbapplypillarpkgconfigplyrpngprettyunitsprogresspromisespurrrR6rappdirsRColorBrewerRcppRcppTOMLreadrreshape2reticulaterlangrprojrootS7scalesstringistringrsystextdatatibbletidyselecttzdbutf8uuidvctrsviridisLitevroomwithr

Evaluating Emotion Classification with evaluate_emotions()
Introduction | Installation and Setup | Basic Usage | Creating Sample Data | Basic Evaluation | Evaluation with Probabilities | Understanding the Metrics | Classification Metrics | Probabilistic Metrics | Inter-rater Reliability | Visualization | Integration with transforEmotion Workflow | Complete Pipeline Example | Using with CSV Data | Advanced Usage | Custom Metrics Selection | Handling Missing Data | Custom Column Names | Best Practices | 1. Always Include Probability Scores | 2. Use Appropriate Metrics | 3. Validate Data Quality | 4. Report Multiple Metrics | Conclusion

Last update: 2026-10-29
Started: 2025-09-16

Setup and Tutorial
1. Python setup using setup_modules() | 2. Using transformer_scores | 3. Using image_scores | 4. Using video_scores

Last update: 2026-10-29
Started: 2022-04-13

Checking faces and coding them by hand
Find the faces | Look at them, and choose | Set up a coding task | Code | Read the answers and check agreement | Compare the model with the coders | Review a model's errors | Privacy

Last update: 2026-10-20
Started: 2026-10-20

Readme and manuals

Help Manual

Help pageTopics
transforEmotion-packagetransforEmotion-package transforEmotion
Initialize Built-in Vision Models.init_builtin_models
Vision Model Registry for transforEmotion Package.vision_model_registry
User-Friendly Vision Model Management Functionsadd_vision_model
Code faces in the browserannotate_faces
Agreement between codersannotation_agreement
Progress of a face annotation taskannotation_progress
Questions for a face annotation taskannotation_questions
Set up a face annotation taskannotation_task
Convert RAG JSON to a tableas_rag_table
Calculate the moving average for a time seriescalculate_moving_average
Calibrate frame scores for posterior_scores()calibrate_scores
Check FindingEmo Dataset Qualitycheck_findingemo_quality
One label per item from several codersconsensus_labels
Delete a Transformer Modeldelete_transformer
Detect faces in images or a videodetect_faces
Dynamics function of the DLO modeldlo_dynamics
Download FindingEmo-Light Datasetdownload_findingemo_data
Draw detected facesdraw_faces plot.te_faces
Emotions Dataemotions
Emoxicon Scoresemoxicon_scores
Generate and emphasize sudden jumps in emotion scoresemphasize
Evaluate Emotion Classification Performanceevaluate_emotions
Score selected facesface_scores
Generate observable emotion scores data from latent variablesgenerate_observables
Generate a matrix of Dynamic Error values for the DLO simulationgenerate_q
Get Vision Model Configurationget_vision_model_config
Calculate image scores using a Hugging Face CLIP modelimage_scores
Calculate image scores for all images in a directory (fast batch)image_scores_dir
Check if Vision Model is Registeredis_vision_model_registered
List Available Vision Modelslist_vision_models
Load FindingEmo-Light Annotationsload_findingemo_annotations
Map Discrete Emotions to VAD (Valence-Arousal-Dominance) Frameworkmap_discrete_to_vad
Map FindingEmo Emotions to Emo8 Labelsmap_to_emo8
Multivariate Normal (Gaussian) DistributionMASS_mvrnorm
NEO-PI-R IPIP Extraversion Item Descriptionsneo_ipip_extraversion
Natural Language Processing Scoresnlp_scores
Parse RAG JSONparse_rag_json
Plot the latent or the observable emotion scores.plot_sim_emotions
Plot Evaluation Resultsplot.emotion_evaluation
Posterior emotions from frame scoresposterior_scores
Prepare FindingEmo Data for Evaluationprepare_findingemo_evaluation
Print method for emotion evaluation resultsprint.emotion_evaluation
Punctuation Removal for Textpunctuate
Python Requirements for transforEmotionpython_requirements
Retrieval-augmented Generation (RAG)rag
RAG JSON utilitiesrag_json_utils
Structured Emotion/Sentiment via RAG (Small LLMs)rag_sentemo
Read the answers of a face annotation taskread_annotations
Read faces chosen in the browserread_face_selection
Register a custom retrieverregister_retriever
Register a Vision Modelregister_vision_model
Remove a Vision Modelremove_vision_model
Select faces to analyseselect_faces
Sentence Similaritysentence_similarity
Use a Shared or Offline Cachesetup_cache
Install GPU Python Modulessetup_gpu_modules
Deprecated: Miniconda setup (use uv instead)setup_miniconda
Setup Required Python Modulessetup_modules
Quick Setup for Popular Modelssetup_popular_models
Show Available Vision Modelsshow_vision_models
Simulate latent and observed emotion scores for a single "video"simulate_video
Speech Emotion Scores for Segments of an Audio or Video Filespeech_scores
Stop Words from the _tm_ Packagestop_words
Summary method for emotion evaluation resultssummary.emotion_evaluation
Remove reticulate's default virtualenv (r-reticulate)te_cleanup_default_venv
Russian Trolls Data - Small Versiontinytrolls
Sentiment Analysis Scorestransformer_scores
Direct VAD (Valence-Arousal-Dominance) Predictionvad_scores
Validate a RAG JSON structurevalidate_rag_json
Validate RAG Emotion/Sentiment Predictionsvalidate_rag_predictions
Run FER on a YouTube video using a Hugging Face CLIP modelvideo_scores
Look at detected faces in the browser, and choose faces to analyseview_faces