chore: hfspaces deployment prep
Browse files- README.md +16 -107
- requirements.txt +2 -1
README.md
CHANGED
|
@@ -1,81 +1,28 @@
|
|
| 1 |
-
# Image Detection Bypass Utility
|
| 2 |
-
|
| 3 |
-
Circumvention of AI Detection β all wrapped in a clean, user-friendly interface.
|
| 4 |
-
|
| 5 |
---
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
- Input / output analysis panels (via `AnalysisPanel`) to inspect images before/after processing.
|
| 16 |
-
- Background worker thread with progress reporting and rich error dialog (traceback viewer).
|
| 17 |
-
- Graceful handling of `image_postprocess` import errors (shows a critical dialog with the import error).
|
| 18 |
-
|
| 19 |
---
|
| 20 |
|
| 21 |
-
## Quick start
|
| 22 |
-
|
| 23 |
-
### ComfyUI Integration
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
Use ComfyUI Manager and install via GitHub link.
|
| 27 |
-
Or manually clone to custom_nodes folder.
|
| 28 |
-
```bash
|
| 29 |
-
git clone https://github.com/PurinNyova/Image-Detection-Bypass-Utility
|
| 30 |
-
```
|
| 31 |
-
then
|
| 32 |
-
```bash
|
| 33 |
-
cd Image-Detection-Bypass-Utility
|
| 34 |
-
pip install -r requirements.txt
|
| 35 |
-
```
|
| 36 |
-
Thanks to u/Race88 for the help on the ComfyUI code.
|
| 37 |
-
|
| 38 |
-
### Requirements
|
| 39 |
-
- Python 3.8+ recommended
|
| 40 |
-
- PyPI packages:
|
| 41 |
-
```bash
|
| 42 |
-
pip install pyqt5 pillow numpy matplotlib piexif
|
| 43 |
-
# optional but recommended for color matching / some functionality:
|
| 44 |
-
pip install opencv-python
|
| 45 |
|
| 46 |
-
|
| 47 |
-
OR
|
| 48 |
|
| 49 |
-
|
| 50 |
-
pip install -r requirements.txt
|
| 51 |
-
```
|
| 52 |
|
| 53 |
-
|
| 54 |
-
- `image_postprocess.py` β your processing logic (export `process_image(...)` or compatible API).
|
| 55 |
-
- `worker.py` β Worker thread wrapper used to run the pipeline in background.
|
| 56 |
-
- `analysis_panel.py` β UI widget used for input/output analysis.
|
| 57 |
-
- `utils.py` β must provide `qpixmap_from_path(path, max_size=(w,h))`.
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
```bash
|
| 62 |
-
python run.py
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
If `image_postprocess` cannot be imported, the GUI will show an error explaining the import failure (see **Troubleshooting** below).
|
| 66 |
|
| 67 |
---
|
| 68 |
|
| 69 |
-
##
|
| 70 |
-
|
| 71 |
-
2. *(optional)* **Choose Reference** β used for FFT/color reference (OpenCV-based color match supported).
|
| 72 |
-
3. *(optional)* **Choose Auto White-Balance Reference** β used for auto white-balance correction (applied before CLAHE).
|
| 73 |
-
4. **Choose Output** β where processed image will be written.
|
| 74 |
-
5. **Auto Mode** β enable for a single slider to control a bundled preset.
|
| 75 |
-
6. **Manual Mode** β tune individual parameters in the Parameters group.
|
| 76 |
-
7. **Camera Simulator** β enable to reveal camera-specific controls (Bayer, JPEG cycles, vignette, chroma, etc.).
|
| 77 |
-
8. Click **Run β Process Image** to start. The GUI disables controls while running and shows progress.
|
| 78 |
-
9. When finished, the output preview and Output analysis panel update automatically.
|
| 79 |
|
| 80 |
---
|
| 81 |
|
|
@@ -113,45 +60,7 @@ When you click **Run**, the GUI builds a lightweight argument namespace (similar
|
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
-
##
|
| 117 |
-
- The GUI uses a `Worker` thread to avoid blocking the UI. Worker emits signals: `started`, `finished(outpath)`, `error(msg, traceback_text)`.
|
| 118 |
-
- On error, a dialog displays the error message and a full traceback for debugging.
|
| 119 |
-
- If `image_postprocess` fails to import at startup, a critical dialog shows the exception details; fix the module or dependencies and restart.
|
| 120 |
-
|
| 121 |
-
---
|
| 122 |
-
|
| 123 |
-
## Development notes
|
| 124 |
-
- **Integrating your pipeline:** make sure `image_postprocess.py` exports a `process_image(inpath, outpath, args)` function (or adapt `worker.py` to match your pipeline signature).
|
| 125 |
-
- **Analysis panels:** `AnalysisPanel` should provide `update_from_path(path)`; used for both input and output.
|
| 126 |
-
- **Preview helper:** `utils.qpixmap_from_path` is used to load scaled QPixmap for previews β useful for keeping UI responsive.
|
| 127 |
-
- **Packaging:** If you want a single executable, consider `PyInstaller` (note: include `worker.py`, `analysis_panel.py`, `utils.py`, and the pipeline module).
|
| 128 |
-
|
| 129 |
-
---
|
| 130 |
-
|
| 131 |
-
## Troubleshooting
|
| 132 |
-
- **ImportError for `image_postprocess`** β ensure `image_postprocess.py` is in the same directory or on `PYTHONPATH`. Also confirm required packages (numpy, Pillow, opencv) are installed. The GUI shows the import error text at startup.
|
| 133 |
-
- **Previews blank/no image** β check that `qpixmap_from_path` returns a valid QPixmap. The preview widget falls back to `No image` if file missing.
|
| 134 |
-
- **Processing hangs** β confirm Worker is implemented to emit `finished` or `error`. If your `process_image` blocks indefinitely, the GUI will appear unresponsive (worker runs in background thread but won't return).
|
| 135 |
-
- **Color matching unavailable** β color matching uses OpenCV; if you did not install `opencv-python`, the GUI will still run, but reference-based color matching will be disabled.
|
| 136 |
-
|
| 137 |
-
---
|
| 138 |
-
|
| 139 |
-
## Example: minimal `process_image` signature
|
| 140 |
-
```python
|
| 141 |
-
# image_postprocess.py (sketch)
|
| 142 |
-
def process_image(inpath: str, outpath: str, args):
|
| 143 |
-
# args is a SimpleNamespace with attributes described above
|
| 144 |
-
# load image (PIL / numpy), run your pipeline, save output
|
| 145 |
-
pass
|
| 146 |
-
```
|
| 147 |
-
|
| 148 |
-
---
|
| 149 |
-
|
| 150 |
-
## Contributing
|
| 151 |
-
- PRs welcome. If you modify UI layout or parameter names, keep the `args` mapping consistent or update `README` and `worker.py` accordingly.
|
| 152 |
-
- Add unit tests for `worker.py` and the parameter serialization if you intend to refactor.
|
| 153 |
-
|
| 154 |
-
## Gradio / Hugging Face Spaces (Web UI)
|
| 155 |
|
| 156 |
This repository includes a lightweight Gradio front-end (`app_gradio.py`) that wraps the existing
|
| 157 |
`process_image(inpath, outpath, args)` pipeline. The Gradio app is suitable for local testing and
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Deepfake Detection Bypass Utility
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: yellow
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.35.0
|
| 8 |
+
app_file: app_gradio.py
|
| 9 |
+
pinned: true
|
| 10 |
+
short_description: Deepfake detection circumvention utility refactored for HF Spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
# Image Detection Bypass Utility [Gradio Refactor]
|
|
|
|
| 15 |
|
| 16 |
+
Refactored Gradio app for HF Spaces of [Image Detection Bypass](https://github.com/PurinNyova/Image-Detection-Bypass-Utility), self-proclaimed app for the "Circumvention of AI Detection."
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
Strictly for research purposes -- please refer to the original repository for more in-depth documentation and up-to-date code.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
This refactored repository will not be maintained.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
---
|
| 23 |
|
| 24 |
+
## Screenshot
|
| 25 |
+
<img width="1440" height="2184" alt="image" src="https://github.com/user-attachments/assets/b0ee470b-a46a-44f0-b722-5a66c9bfe83f" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
|
|
|
| 60 |
|
| 61 |
---
|
| 62 |
|
| 63 |
+
## Gradio / Hugging Face Spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
This repository includes a lightweight Gradio front-end (`app_gradio.py`) that wraps the existing
|
| 66 |
`process_image(inpath, outpath, args)` pipeline. The Gradio app is suitable for local testing and
|
requirements.txt
CHANGED
|
@@ -3,4 +3,5 @@ pillow
|
|
| 3 |
numpy
|
| 4 |
matplotlib
|
| 5 |
piexif
|
| 6 |
-
opencv-python
|
|
|
|
|
|
| 3 |
numpy
|
| 4 |
matplotlib
|
| 5 |
piexif
|
| 6 |
+
opencv-python
|
| 7 |
+
scipy
|