Update README.md
Browse files
README.md
CHANGED
@@ -1,54 +1,52 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
-
|
12 |
-
-
|
13 |
-
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
20 |
-
|
21 |
-
| `python app.py
|
22 |
-
| `python app.py /path/to/
|
23 |
-
| `python app.py /path/to/
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
- **
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
-
|
36 |
-
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
## License
|
53 |
-
|
54 |
This project is licensed under the [MIT License](LICENSE).
|
|
|
1 |
+
# Image Captioning App
|
2 |
+
|
3 |
+
## Overview
|
4 |
+
|
5 |
+
This application generates descriptive captions for images using advanced ML models. It processes single images or entire directories, leveraging CLIP and LLM models for accurate and contextual captions. It has NSFW captioning support with natural language.
|
6 |
+
|
7 |
+
## Features
|
8 |
+
|
9 |
+
- Single image and batch processing
|
10 |
+
- Multiple directory support
|
11 |
+
- Custom output directory
|
12 |
+
- Adjustable batch size
|
13 |
+
- Progress tracking
|
14 |
+
|
15 |
+
## Usage
|
16 |
+
|
17 |
+
| Command | Description |
|
18 |
+
|---------|-------------|
|
19 |
+
| `python app.py image.jpg` | Process a single image |
|
20 |
+
| `python app.py /path/to/directory` | Process all images in a directory |
|
21 |
+
| `python app.py /path/to/dir1 /path/to/dir2` | Process multiple directories |
|
22 |
+
| `python app.py /path/to/dir --output /path/to/output` | Specify output directory |
|
23 |
+
| `python app.py /path/to/dir --bs 8` | Set batch size (default: 4) |
|
24 |
+
|
25 |
+
## Technical Details
|
26 |
+
|
27 |
+
- **Models**: CLIP (vision), LLM (language), custom ImageAdapter
|
28 |
+
- **Optimization**: CUDA-enabled GPU support
|
29 |
+
- **Error Handling**: Skips problematic images in batch processing
|
30 |
+
|
31 |
+
## Requirements
|
32 |
+
|
33 |
+
- Python 3.x
|
34 |
+
- PyTorch
|
35 |
+
- Transformers library
|
36 |
+
- CUDA-capable GPU (recommended)
|
37 |
+
|
38 |
+
## Installation
|
39 |
+
|
40 |
+
```bash
|
41 |
+
git clone https://huggingface.co/Wi-zz/joy-caption-pre-alpha
|
42 |
+
cd joy-caption-pre-alpha
|
43 |
+
pip install -r requirements.txt
|
44 |
+
```
|
45 |
+
|
46 |
+
## Contributing
|
47 |
+
|
48 |
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
49 |
+
|
50 |
+
## License
|
51 |
+
|
|
|
|
|
52 |
This project is licensed under the [MIT License](LICENSE).
|