Build(deps-dev): Bump postcss from 8.5.15 to 8.5.24
Bumps postcss from 8.5.15 to 8.5.24.
updated-dependencies:
- dependency-name: postcss dependency-version: 8.5.24 dependency-type: direct:development …
Signed-off-by: dependabot[bot] support@github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Content Review Filters
View Live Demo →
This repository contains a collection of React components to enable developers to integrate content filters and settings in content review tools.
Content Review Filters Features
Image & Video Filters
All filters are independently configurable with adjustable intensity levels (where applicable) and can be combined for cumulative effect.
Video Playback Controls
Special playback features for video content to give reviewers more control:
Per-Harm-Type Preferences
Filters can be configured differently based on content harm types. For example:
Persistent Settings
User preferences are stored in browser localStorage by default, so settings persist across sessions. For cross-device persistence, preferences can be synced with a server-side database.
Interactive Filter Controls
When enabled, a control bar appears on hover allowing reviewers to adjust filters for individual pieces of media in real-time.
Technical Notes
Reduced Detail Filter
The reduced detail filter uses WebGL to apply shaders to images or videos to make them appear as an illustration.
Warning Screen Integration
The warning screen filter requires integration of your own AI model for content detection - you can build your own model, write a prompt for an LLM, or use an off-the-shelf solution from Trust & Safety or image recognition/Content Understanding AI vendors.
Integration Options
There are multiple ways of integrating these components into your own tool, depending on how much customization you would like:
ContentFilteredImageandContentFilteredVideocomponents to render your image/video, with out-of-the box controls.ContentFilteredImageWrapperandContentFilteredVideoWrapperto wrap an HTMLimgorvideotag within your own custom image viewer or video player. UseContentFilterContextProviderto write the state of each filter (enabled/disabled), which will then be read by the aforementioned wrapper components to apply the filters. We provide each control button from Option A as a separate component, allowing you to arrange these as you need or to override styles and icons to fit the theme of your application.The library also includes an example settings menu component for users to configure global preferences.
While this repository only contains React implementations of these filters, we welcome contributions of equivalent components for other web frameworks. We also welcome other contributions to continue to improve these tools.
Security Considerations
When integrating these content review filters into production systems, please keep the following security considerations in mind:
AI Model Integration and Content Detection
If you’re using the warning screen filter with AI-based content detection:
User Input Sanitization
The components in this library accept user-provided inputs that are displayed to users:
captionprop can contain user-generated text that will be displayed on warning screens. If this text comes from untrusted sources (e.g., user input, external APIs), you should sanitize it to prevent the display of misleading or malicious messages. While React provides XSS protection by default, semantic attacks (displaying misleading information that appears to come from your application) are still possible.harmTypeprop is used to generate warning messages (e.g., “Possible {harmType}”). Ensure this value comes from a controlled set of labels in your application, not directly from user input or untrusted sources.Content Security Policy (CSP)
When using these filters with images and videos from external sources:
LocalStorage Security
The preference management system uses browser localStorage:
Reduced Detail Filter Citation
Files in the reduced_detail directory are adapted from the Reducing Affective Responses to Surgical Images and Videos Through Stylization paper, with some relevant modifications to make it work in the context of a React app.
Citation: Lonni Besançon, Amir Semmo, David Biau, Bruno Frachet, Virginie Pineau, et al.. Reducing Affective Responses to Surgical Images and Videos Through Stylization. Computer Graphics Forum, Wiley, In press, 39, ff10.1111/cgf.13886ff. ffhal-02381513v2ff
They were published in this GitHub repo with Apache license: https://github.com/lonnibesancon/Arkangel
You can find the original paper here: https://inria.hal.science/hal-02381513/file/besancon-surgery-inpress.pdf
And a TedX talk about the project here: https://www.youtube.com/watch?v=pDHomZ8FEoU
License
Content Review Filteres is Apache-2 licensed, as found in the LICENSE file.