Vid-Scratch is a desktop application for adversarial video poisoning and robustness testing.
It is designed to generate visually similar but model-disruptive video outputs through a Tauri-based desktop interface connected to a Python processing engine.
Vid-Scratch combines:
- a Tauri desktop frontend for user interaction
- a Python backend engine for adversarial video generation
- a workflow for uploading videos, configuring attack settings, previewing outputs, and exporting results
The project focuses on studying how action recognition systems can be affected by sparse perturbations while keeping the result close to the original video for human viewers.
- Upload and process video files
- Configure poisoning or adversarial generation settings
- Generate sparse perturbations on selected frames
- Use spatial transformation and SSIM-based constraints
- Preview processed outputs
- Export generated videos
- Desktop app workflow with Tauri
- Automated testing with GitHub Actions
VID-SCRATCH/
├── .github/
│ └── workflows/
│ └── ci.yml
├── python/
│ ├── attack.py
│ ├── model_wrapper.py
│ ├── spatial_transformer.py
│ ├── ssim.py
│ ├── video_io.py
│ └── vidscratch.py
├── tauri-app/
│ ├── components/
│ ├── public/
│ ├── src/
│ ├── src-tauri/
│ │ ├── capabilities/
│ │ ├── engine/
│ │ ├── icons/
│ │ ├── src/
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── tauri.conf.json
│ ├── package.json
│ ├── vite.config.ts
│ ├── vitest.config.ts
│ └── README.md
├── LICENSE
├── main.js
├── package.json
├── preload.js
└── index.html- React
- TypeScript
- Vite
- Tauri
- Python
- PyTorch
- OpenCV
- NumPy
- SciPy
- Pytest
- Vitest
- GitHub Actions
git clone https://github.com/Vid-Scratch-Senior-Project/Vid-Scratch
cd VID-SCRATCHGo to the Python folder and install the required packages.
cd python
pip install -r requirements.txtIf there is no requirements.txt yet, install the main dependencies manually.
pip install torch numpy opencv-python scipy pytestGo to the Tauri application folder and install Node.js packages.
cd ../tauri-app
npm installBefore running the app, make sure your machine already has:
- Node.js and npm
- Rust and Cargo
- Tauri system prerequisites for your OS
From the tauri-app folder, start the desktop app in development mode:
npm run tauri devThis is the main way to run the system during development.
cd python
python -m pytest -qcd ../tauri-app
npm testIf your frontend test script is different, use the script defined in tauri-app/package.json.
The general workflow is:
- Launch the Tauri desktop application
- Upload a video file
- Configure poisoning or adversarial settings
- Start the generation process
- Let the Python engine process the video
- Preview the generated result
- Export the output video
cd python
pip install -r requirements.txt
cd ../tauri-app
npm install
npm run tauri devRun tests:
cd ../python
python -m pytest -qThis repository includes GitHub Actions for continuous integration.
The CI workflow automatically runs when code is pushed or when a pull request is opened.
After pushing your code:
- Open the repository on GitHub
- Go to the Actions tab
- Check whether the workflow passes successfully
As AI systems become better at understanding and classifying video content, creators have less control over how their media is interpreted by machine learning models.
Vid-Scratch explores a practical way to generate adversarial video outputs that remain close to the original for people, while affecting how AI models interpret them.
This project can be used for:
- adversarial machine learning experiments
- robustness evaluation
- AI security demonstrations
- research on creator-oriented protection tools
Vid-Scratch is currently under development.
The desktop interface, processing pipeline, and testing workflow are actively being integrated and improved.
- Improve desktop app usability
- Add better attack parameter presets
- Improve preview and export workflow
- Extend support for more evaluation settings
- Improve packaging and release flow
- Add more experiment and benchmark results
Contributions, issues, and suggestions are welcome.
Feel free to fork the repository and open a pull request.
This project is released under the license provided in this repository.
Pichayoot Tanasinanan
Kasetsart University
Software and Knowledge Engineering