Subir archivos a "/"

This commit is contained in:
2026-04-17 23:21:45 +02:00
parent ba15e8bc14
commit f368991d37
5 changed files with 69 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Carlos Daniel Sierra Álvarez, Juan Francisco Moreno Luna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+48
View File
@@ -0,0 +1,48 @@
# Deep Learning in Mass Spectrometry Imaging: A Hybrid Julia-Python Workflow
This repository contains the computational pipeline for the automated anatomical mapping of *Datura innoxia* (toloache) using Mass Spectrometry Imaging (MSI). The workflow addresses the "two-language problem" by leveraging **Julia** for high-performance data preprocessing and **Python** for self-supervised representation learning.
## Key Features
- **High-Performance Preprocessing**: Rapid `.imzML` ingestion and TrIQ normalization using Julia.
- **Self-Supervised Learning**: Contrastive learning (SimCLR) with an EfficientNet-B0 backbone implemented in PyTorch.
- **Empirical Clustering**: Automated anatomical segmentation using PCA and K-Means, optimized for vascular and parenchymal tissue differentiation.
- **CPU Optimized**: Designed to run on standard consumer hardware (no GPU required for inference).
## Project Structure
- `scripts_julia/`: Julia scripts for mass slice extraction, TrIQ normalization, and image generation.
- `scripts_python/`: Python scripts for SimCLR training, feature extraction, and clustering.
- `Model/`: Contains the pre-trained weights (`msi_encoder_trained.pth`).
- `environment/`: Dependency list (`requirements.txt`).
- `Articule MSI/`: Manuscript draft and documentation.
## Installation
### Python
It is recommended to use a virtual environment:
```bash
pip install -r environment/requirements.txt
```
### Julia
Ensure you have Julia installed and the following packages: `MSI.jl`, `ImzML.jl`, `Images.jl`, and `DataFrames.jl`.
## Usage Workflow
1. **Preprocessing (Julia)**:
Run `scripts_julia/preparar_datos_simclr.jl` to convert `.imzML` data into normalized PNG ion maps.
2. **Training (Optional)**:
Run `scripts_python/CNN_proof_1.py` to retrain the SimCLR encoder.
3. **Clustering & Mapping**:
Use `scripts_python/cluster_msi_direct.py` to extract embeddings from the pre-trained model and generate the metabolic clusters.
4. **Visualization**:
Run `scripts_python/visualizar_clusters.py` to generate the final cluster galleries.
## Citation & Acknowledgments
This implementation is based on the methodology proposed by:
> Hu, H., Bindu, J. P., & Laskin, J. (2022). Self-supervised clustering of mass spectrometry imaging data using contrastive learning. *Chemical Science*, 13(1), 90-98. DOI: [10.1039/d1sc04077d](https://doi.org/10.1039/d1sc04077d)
## License
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB