Coder Social home page Coder Social logo

masr-for-digital-rock-images's Introduction

Multi Attention Super-Resolution Neural Network (MASR)

This repository is an official PyTorch implementation of the paper "Digital rock resolution enhancement and detail recovery with multi attention neural network "

The source code is primarily derived from EDSR and CDCSR. We provide full training and testing codes, pre-trained models used in our paper. You can train your model from scratch, or use a pre-trained model to enlarge your digital rock images.

Code

Dependencies

  • Python 3.8.5
  • PyTorch = 1.8.1
  • numpy
  • cv2
  • skimage
  • tqdm

Quick Start

git clone https://github.com/MHDXing/MASR-for-Digital-Rock-Images.git
cd MASR-for-Digital-Rock-Images-main/MASR

Dataset

The dataset we used was derived from DeepRockSR. There are 9600, 1200, 1200 HR 2D images (500x500) for training, testing and validation, respectively.

Training

  1. Download the dataset and unpack them to any place you want. Then, change the dataroot and test_dataroot argument in ./options/realSR_MASR.py to the place where images are located
  2. You can change the hyperparameters of different models by modifying the files in the ./options/ folder
  3. Run CDC_train_test.py using script file train_pc.sh
bash train_pc.sh
  1. You can find the results in ./experiments/MASR_x4 if the exp_name argument in ./options/realSR_MASR.py is MASR_x4.

Testing

  1. Download our pre-trained models to ./models folder or use your pre-trained models
  2. Change the test_dataroot argument in CDC_test.py to the place where images are located
  3. Run CDC_test.py using script file test_models_pc.sh
bash test_models_pc.sh
  1. You can find the enlarged images in ./results folder.

Pretrained models

MASR Models

masr-for-digital-rock-images's People

Contributors

mhdxing avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

masr-for-digital-rock-images's Issues

DeepRockSR

请问DeepRockSR时怎么组织其中的数据呢,因为里面有2D 3D的不同分辨率下的数据,没有发现掩膜数据啊?不知道是不是我漏了什么,请问训练和测试时是怎么组织呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.