https://github.com/cbib/saliencenet

https://github.com/cbib/saliencenet

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: biorxiv.org, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: cbib
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 830 KB
Statistics
  • Stars: 7
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of EdgarLefevre/SalienceNet
Created over 3 years ago · Last pushed almost 3 years ago

https://github.com/cbib/SalienceNet/blob/main/

# SalienceNet

Deep Learning style transfert for nuclei enhancement : https://www.scitepress.org/Papers/2023/116235/116235.pdf

First version : https://www.biorxiv.org/content/10.1101/2022.10.27.514030v1.article-info

![alt text](figure_results.png)

## Prerequisites
- Linux or macOS
- Python 3
- CPU or NVIDIA GPU + CUDA CuDNN

## Getting Started
### Installation

- Clone this repo:
```bash
git clone https://github.com/ebouilhol/SalienceNet.git
cd SalienceNet
```

- Install [PyTorch](http://pytorch.org) and 0.4+ and other dependencies (e.g., torchvision, [visdom](https://github.com/facebookresearch/visdom) and [dominate](https://github.com/Knio/dominate)).
  - For pip users :
  `pip install -r requirements.txt`.
  - For Conda users, you can create a new Conda environment using :
  `conda env create -f env.yaml`.


### Download pre-trained model
SalienceNet pre-trained model V0 is available on zenodo :
https://zenodo.org/record/7266921/files/salienceNet.zip?download=1

Once downloaded, move it to /SalienceNet/checkpoints and unzip it.

### Dataset
To create a dataset please use the following architecture : 
```bash

 dataset_folder
     testA
     testB
     trainA
     trainB
    
```
*A* being the source style dataset and *B* the target style dataset.

### Pretrained model
A pretrained model is available, to use it for prediction use the model name salienceNet :

/!\ The pretrained model is trained on grayscale images with 1 channel, do not forget to use "--input_nc 1 --output_nc 1" as shown below.

```bash
#!./scripts/test_cyclegan.sh
python test.py --gpu_ids x --dataroot datasets/dataset_example/ --model cycle_gan --input_nc 1 --output_nc 1 --name salienceNet

```

### CycleGAN train/test

- To view training results and loss plots, run `python -m visdom.server` and click the URL http://localhost:8097.
- To log training progress and test images to W&B dashboard, set the `--use_wandb` flag with train and test scrip


- To train a new model:
```bash
#!./scripts/train_cyclegan.sh
python train.py  --gpu_ids x --dataroot datasets/dataset_example/ --n_epochs xxx  --model cycle_gan --gan_mode LSSSIMGRAD --name modelname --wcrit1 0.2 --wcrit2 0.2 --wcrit3 0.6
```
To see more intermediate results, check out `./checkpoints/maps_cyclegan/web/index.html`.
- Test the model:
```bash
#!./scripts/test_cyclegan.sh
python test.py --gpu_ids x --dataroot datasets/dataset_example/ --model cycle_gan --name modelname

```
- The test results will be saved to a html file here: `./results/maps_cyclegan/latest_test/index.html`.




## Acknowledgments
Our code is inspired by [pytorch-cycleGAN](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix).
For more information regarding the possible test and train option please refer to this github.

Owner

  • Name: Centre de Bioinformatique de Bordeaux
  • Login: cbib
  • Kind: organization
  • Location: Université de Bordeaux (146, rue Léo Saignat 33076 Bordeaux cedex)

GitHub Events

Total
Last Year