Affective Research on Representations and Classifications
Affective Research on Representations and Classifications (ARRC) is an open-source framework for AER model development. It is written using the multi-backend Keras 3.0 API with support for both Tensorflow and PyTorch backends. The core of ARRC is the ARRCModel class that encapsulates a user-defined feature extractor. ARRCModel provides an optional classification head, enabling it to be used for metric learning and classification problems alike. Loss functions can be applied to embedding output or classification output layers separately or as weighted losses applied to both simultaneously. The ARRC source code includes implementations of the feature extractors described in Section 7.2, and is compatible with any Keras, Tensorflow or PyTorch loss function. ARRC also provides several custom layers used for data augmentation during training. The available data augmentations include additive Gaussian noise, random time shift, and random amplitude scaling
Quick Index of this README:
- Want to know if you can use it? Jump to Intended Use and License
- Want to know how to use it? Jump to Quick Start
- Want to help out? Jump to Contributing
Quick Start
Step 1: Installation
pip install arrc
Intended Use and License
This library is intended for use by only by academic researchers to facilitate advancements in emotion research. It is not for commercial use under any circumstances.
This library is licensed under the CC BY-NC-SA 4.0 International License.
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
Under the followiung terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial — You may not use the material for commercial purposes
- ShareALike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Quick Start
import keras
from arrc.models import ARRCModel
ecg_duration_sec = 30 # Seconds
ecg_sample_rate = 256 # Hertz
# Single - channel ECG Input
inputs = keras.Input(shape=(ecg_duration_sec * ecg_sample_rate, 1))
features = keras.layers.Conv1D ( filters =64, kernel_size =7, padding = "same" )(inputs)
features = keras.layers.MaxPooling1D()(features)
features = keras.layers.Conv1D(filters =128, kernel_size =3, padding = "same", activation = 'relu')(features)
features = keras.layers.GlobalMaxPooling1D()(features)
model = ARRCModel.BuildARRCModel(
inputs = inputs,
embedding_outputs = features,
num_classes = 4,
)
model.summary ()
Contributing
We are happy to support you by accepting pull requests that make this library more broadly applicable, or by accepting issues to do the same. If you have an AER dataset you would like us to integrate, please open an issue for that as well, but we will be unable to process issues requesting integration with non-AER datasets at this time.
If you would like to get involved by maintaining dataset integrations in other areas of research, please get in touch and we'd be happy to have the help!
Metadata
Release files for arrc 0.6.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arrc-0.6.1.1.tar.gz | 382.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arrc-0.6.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 453.8 kB
Release files / arrc-0.6.1.1.tar.gz
| Download URL | arrc-0.6.1.1.tar.gz |
|---|---|
| Size | 382.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a1daaf921fd76edce61d4716d601052728b545ada4eb3604e34040c3fb32ae4
|
|
BLAKE2b-256 checksum How to use checksums |
fa360db6a296443b5e9fd368380d228acf125b6cf6f6736d4e168d0085f599cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / arrc-0.6.1.1-py3-none-any.whl
| Download URL | arrc-0.6.1.1-py3-none-any.whl |
|---|---|
| Size | 71.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
facd9639b31a727e543250283fcad5f1b758a6063d0f9feb6ca47cc882940716
|
|
BLAKE2b-256 checksum How to use checksums |
878b82fd3f9e0b92c54276882ed4ad9987de4bfe466c96a20fb88455683295e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|