Instructions to use JoseGomezFreelance/OsteoXRay_V0.1_Flux_Kontext_JGF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use JoseGomezFreelance/OsteoXRay_V0.1_Flux_Kontext_JGF with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("JoseGomezFreelance/OsteoXRay_V0.1_Flux_Kontext_JGF") prompt = "Make marks where there is a fracture" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,14 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
tags:
|
| 3 |
-
- text-to-image
|
| 4 |
- lora
|
|
|
|
| 5 |
- diffusers
|
| 6 |
- template:diffusion-lora
|
|
|
|
|
|
|
|
|
|
| 7 |
widget:
|
| 8 |
- output:
|
| 9 |
url: images/test_sintético_fractura_OsteoXRay_V0.1_Flux_Kontext_JGF_1.jpeg
|
|
@@ -14,7 +19,6 @@ widget:
|
|
| 14 |
- output:
|
| 15 |
url: images/test_sintético_fractura_OsteoXRay_V0.1_Flux_Kontext_JGF_3.jpeg
|
| 16 |
text: Make marks where there is a fracture
|
| 17 |
-
base_model: ''
|
| 18 |
instance_prompt: Make marks where there is a fracture
|
| 19 |
license: cc-by-nc-sa-4.0
|
| 20 |
---
|
|
@@ -31,36 +35,51 @@ Can a model like Flux Kontext, designed for editing art and photography, be used
|
|
| 31 |
The quick answer: it does do something interesting, but it over-scores and is far from reliable as a medical tool. It's a prototype to play with the idea, nothing more.
|
| 32 |
|
| 33 |
How to use it
|
|
|
|
| 34 |
1. Upload a bone X-ray (real or synthetic).
|
| 35 |
2. Ask: “Make marks where there is a fracture”.
|
| 36 |
3. Adjust denoise, sampler adn scheduler according to what you're looking for:
|
| 37 |
|
| 38 |
Prudent mode (fewer false positives)
|
|
|
|
| 39 |
• Sampler Euler, 15 steps
|
| 40 |
• Scheduler Karras
|
| 41 |
• Denoise 0.90
|
|
|
|
| 42 |
Test results:
|
|
|
|
| 43 |
• False positives ≈ 24%
|
| 44 |
• Fracture detection ≈ 20%
|
| 45 |
|
| 46 |
Sensitive mode (more detection, lots of noise)
|
|
|
|
| 47 |
• Euler, 15 steps, Karras
|
| 48 |
• Denoise 1.0
|
|
|
|
| 49 |
Result:
|
|
|
|
| 50 |
• False positives ≈ 80%
|
| 51 |
• Fracture detection ≈ 86%
|
| 52 |
|
| 53 |
-
Even more aggressive settings (e.g. rk beta57 to denoise 1.0) reach the absurd:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
With a synthetic mini-dataset for Civitai of images made with 100% AI (10 healthy X-rays and 10 fractured):
|
|
|
|
| 55 |
• False positives: 100% in healthy bones.
|
| 56 |
• Fracture detection: ≈ 45%
|
| 57 |
|
| 58 |
Good for:
|
|
|
|
| 59 |
⁃ AI prototypes and tests on medical imaging.
|
| 60 |
⁃ Eye-catching visualizations of "suspicious" areas in X-rays (experimental and creative art, here's an exotic tool xD)
|
| 61 |
⁃ Didactic/experimental material to play with sensitivity vs false positives.
|
| 62 |
|
| 63 |
Not good for:
|
|
|
|
| 64 |
⁃ Diagnose nothing serious.
|
| 65 |
⁃ Replacing a doctor, not even close!
|
| 66 |
|
|
@@ -72,7 +91,7 @@ Of course, taking into account that it is open source, fast (25 seconds per anal
|
|
| 72 |
|
| 73 |
Have fun!
|
| 74 |
|
| 75 |
-
More images here: https:
|
| 76 |
|
| 77 |
———
|
| 78 |
|
|
@@ -83,11 +102,13 @@ Experimento sin pretensiones que me propuso un amigo:
|
|
| 83 |
La respuesta rápida: sí hace algo interesante, pero marca de más y está muy lejos de ser fiable como herramienta médica. Es un prototipo para jugar con la idea, nada más.
|
| 84 |
|
| 85 |
Cómo usarlo
|
|
|
|
| 86 |
1 Carga una radiografía de huesos (real o sintética).
|
| 87 |
2 Pide: «Make marks where there is a fracture».
|
| 88 |
3 Ajusta denoise, sampler y scheduler según lo que busques:
|
| 89 |
|
| 90 |
• Modo prudente (menos falsos positivos)
|
|
|
|
| 91 |
◦ Sampler Euler, 15 pasos
|
| 92 |
◦ Scheduler Karras
|
| 93 |
◦ Denoise 0.90
|
|
@@ -96,23 +117,30 @@ Cómo usarlo
|
|
| 96 |
▪ Detección de fracturas ≈ 20 %
|
| 97 |
|
| 98 |
• Modo sensible (más detección, mucho ruido)
|
|
|
|
| 99 |
◦ Euler, 15 pasos, Karras
|
| 100 |
◦ Denoise 1.0
|
| 101 |
◦ Resultado:
|
| 102 |
▪ Falsos positivos ≈ 80 %
|
| 103 |
▪ Detección de fracturas ≈ 86 %
|
| 104 |
|
| 105 |
-
Configuraciones aún más agresivas (p. ej. rk beta57 a denoise 1.0) llegan al absurdo:
|
|
|
|
|
|
|
|
|
|
| 106 |
Con un mini-dataset sintético para Civitai de imágenes hechas con IA al 100% (10 rayos X sanos y 10 con fractura):
|
|
|
|
| 107 |
• Falsos positivos: 100 % en huesos sanos.
|
| 108 |
• Detección de fracturas: ≈ 45 %
|
| 109 |
|
| 110 |
Bueno para:
|
|
|
|
| 111 |
• Prototipos y pruebas de IA sobre imagen médica.
|
| 112 |
• Visualizaciones llamativas de zonas «sospechosas» en rayos X (arte experimental y creativo, aquí tienes una herramienta exótica xD)
|
| 113 |
• Material didáctico / experimental para jugar con sensibilidad vs falsos positivos.
|
| 114 |
|
| 115 |
No es bueno para:
|
|
|
|
| 116 |
• Diagnosticar nada serio.
|
| 117 |
• Sustituir a un médico, ¡ni de lejos!.
|
| 118 |
|
|
@@ -124,7 +152,7 @@ Eso sí, teniendo en cuenta que es de código abierto, rápido (25 segundos por
|
|
| 124 |
|
| 125 |
¡A pasarlo bien!
|
| 126 |
|
| 127 |
-
Más imágenes aquí: https:
|
| 128 |
|
| 129 |
## Trigger words
|
| 130 |
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- black-forest-labs/FLUX.1-Kontext-dev
|
| 4 |
tags:
|
|
|
|
| 5 |
- lora
|
| 6 |
+
- text-to-image
|
| 7 |
- diffusers
|
| 8 |
- template:diffusion-lora
|
| 9 |
+
- art
|
| 10 |
+
- image
|
| 11 |
+
- tool
|
| 12 |
widget:
|
| 13 |
- output:
|
| 14 |
url: images/test_sintético_fractura_OsteoXRay_V0.1_Flux_Kontext_JGF_1.jpeg
|
|
|
|
| 19 |
- output:
|
| 20 |
url: images/test_sintético_fractura_OsteoXRay_V0.1_Flux_Kontext_JGF_3.jpeg
|
| 21 |
text: Make marks where there is a fracture
|
|
|
|
| 22 |
instance_prompt: Make marks where there is a fracture
|
| 23 |
license: cc-by-nc-sa-4.0
|
| 24 |
---
|
|
|
|
| 35 |
The quick answer: it does do something interesting, but it over-scores and is far from reliable as a medical tool. It's a prototype to play with the idea, nothing more.
|
| 36 |
|
| 37 |
How to use it
|
| 38 |
+
|
| 39 |
1. Upload a bone X-ray (real or synthetic).
|
| 40 |
2. Ask: “Make marks where there is a fracture”.
|
| 41 |
3. Adjust denoise, sampler adn scheduler according to what you're looking for:
|
| 42 |
|
| 43 |
Prudent mode (fewer false positives)
|
| 44 |
+
|
| 45 |
• Sampler Euler, 15 steps
|
| 46 |
• Scheduler Karras
|
| 47 |
• Denoise 0.90
|
| 48 |
+
|
| 49 |
Test results:
|
| 50 |
+
|
| 51 |
• False positives ≈ 24%
|
| 52 |
• Fracture detection ≈ 20%
|
| 53 |
|
| 54 |
Sensitive mode (more detection, lots of noise)
|
| 55 |
+
|
| 56 |
• Euler, 15 steps, Karras
|
| 57 |
• Denoise 1.0
|
| 58 |
+
|
| 59 |
Result:
|
| 60 |
+
|
| 61 |
• False positives ≈ 80%
|
| 62 |
• Fracture detection ≈ 86%
|
| 63 |
|
| 64 |
+
Even more aggressive settings (e.g. rk beta57 to denoise 1.0) reach the absurd:
|
| 65 |
+
|
| 66 |
+
100% false positives and 100% detection:
|
| 67 |
+
|
| 68 |
+
it paints everything red and almost hits all fractures beyond marking healthy areas, for an untrained eye.
|
| 69 |
+
|
| 70 |
With a synthetic mini-dataset for Civitai of images made with 100% AI (10 healthy X-rays and 10 fractured):
|
| 71 |
+
|
| 72 |
• False positives: 100% in healthy bones.
|
| 73 |
• Fracture detection: ≈ 45%
|
| 74 |
|
| 75 |
Good for:
|
| 76 |
+
|
| 77 |
⁃ AI prototypes and tests on medical imaging.
|
| 78 |
⁃ Eye-catching visualizations of "suspicious" areas in X-rays (experimental and creative art, here's an exotic tool xD)
|
| 79 |
⁃ Didactic/experimental material to play with sensitivity vs false positives.
|
| 80 |
|
| 81 |
Not good for:
|
| 82 |
+
|
| 83 |
⁃ Diagnose nothing serious.
|
| 84 |
⁃ Replacing a doctor, not even close!
|
| 85 |
|
|
|
|
| 91 |
|
| 92 |
Have fun!
|
| 93 |
|
| 94 |
+
More images here: https://civitai.com/models/2200109/osteoxrayv01fluxkontextjgf
|
| 95 |
|
| 96 |
———
|
| 97 |
|
|
|
|
| 102 |
La respuesta rápida: sí hace algo interesante, pero marca de más y está muy lejos de ser fiable como herramienta médica. Es un prototipo para jugar con la idea, nada más.
|
| 103 |
|
| 104 |
Cómo usarlo
|
| 105 |
+
|
| 106 |
1 Carga una radiografía de huesos (real o sintética).
|
| 107 |
2 Pide: «Make marks where there is a fracture».
|
| 108 |
3 Ajusta denoise, sampler y scheduler según lo que busques:
|
| 109 |
|
| 110 |
• Modo prudente (menos falsos positivos)
|
| 111 |
+
|
| 112 |
◦ Sampler Euler, 15 pasos
|
| 113 |
◦ Scheduler Karras
|
| 114 |
◦ Denoise 0.90
|
|
|
|
| 117 |
▪ Detección de fracturas ≈ 20 %
|
| 118 |
|
| 119 |
• Modo sensible (más detección, mucho ruido)
|
| 120 |
+
|
| 121 |
◦ Euler, 15 pasos, Karras
|
| 122 |
◦ Denoise 1.0
|
| 123 |
◦ Resultado:
|
| 124 |
▪ Falsos positivos ≈ 80 %
|
| 125 |
▪ Detección de fracturas ≈ 86 %
|
| 126 |
|
| 127 |
+
Configuraciones aún más agresivas (p. ej. rk beta57 a denoise 1.0) llegan al absurdo:
|
| 128 |
+
|
| 129 |
+
100 % falsos positivos y 100 % detección: lo pinta todo de rojo y casi acierta en todas las fracturas más allá de marcar zonas, para un ojo poco entrenado, sanas.
|
| 130 |
+
|
| 131 |
Con un mini-dataset sintético para Civitai de imágenes hechas con IA al 100% (10 rayos X sanos y 10 con fractura):
|
| 132 |
+
|
| 133 |
• Falsos positivos: 100 % en huesos sanos.
|
| 134 |
• Detección de fracturas: ≈ 45 %
|
| 135 |
|
| 136 |
Bueno para:
|
| 137 |
+
|
| 138 |
• Prototipos y pruebas de IA sobre imagen médica.
|
| 139 |
• Visualizaciones llamativas de zonas «sospechosas» en rayos X (arte experimental y creativo, aquí tienes una herramienta exótica xD)
|
| 140 |
• Material didáctico / experimental para jugar con sensibilidad vs falsos positivos.
|
| 141 |
|
| 142 |
No es bueno para:
|
| 143 |
+
|
| 144 |
• Diagnosticar nada serio.
|
| 145 |
• Sustituir a un médico, ¡ni de lejos!.
|
| 146 |
|
|
|
|
| 152 |
|
| 153 |
¡A pasarlo bien!
|
| 154 |
|
| 155 |
+
Más imágenes aquí: https://civitai.com/models/2200109/osteoxrayv01fluxkontextjgf
|
| 156 |
|
| 157 |
## Trigger words
|
| 158 |
|