Git Product home page Git Product logo

comp683-s24's Introduction

Introduction

This repository hosts the COMP683 final project: Tumor Type Prediction using Convolutional Neural Networks (CNNs). The classification results for 33 tumor types are summarized in the following table.

CNN Architecture # Parameters Test Accuracy (%)
ResNet18 11,193,441 95.30
ResNet50 23,575,649 94.85
MobileNetV2 2,266,145 94.30
SqueezeNet 739,425 91.14

Repository Structure

  • src/: Contains all source files.
    • common_functions.py: Includes common functions for CNN training and testing.
    • image_transformer.py: Transforms 1-D features to 2-D images using feature similarity, adapted from DeepInsight.
    • process_tcga_dataset.py: Reads TCGA RNA-seq data for 33 tumor types and converts the sample-feature matrix into 2-D images.
    • test_cnns.py: Trains and evaluates prediction accuracy across 33 tumor types using various CNN architectures on converted 2-D images.
    • tcga_files.py: Lists predefined filenames and tumor names for the 33 tumor types, sourced from the UCSC Xena Portal.

How to Reproduce the Results

1. Download TCGA RNA-Seq Data

  • Visit the UCSC Xena Portal.
  • Select the Harmonized dataset by clicking on the GDC hub checkbox.
  • Download the required files listed in ./src/TCGA/tcga_file_list.txt into the ./src/TCGA folder

2. Convert Gene Expression Data to 2-D Images

Navigate to the src directory, run the following Python script to convert the TCGA gene expression data into 2-D images:

python process_tcga_dataset.py

This script will generate a file named feat2img.bin, which includes all the 2-D images along with their corresponding labels.

3. Train and Evaluate CNN Models

Continue in the src directory, execute following Python script to train and evaluate the prediction accuracy for 33 tumor types using various CNN architectures, including SqueezeNet, MobileNet, ResNet18, and ResNet50:

python test_cnns.py

comp683-s24's People

Contributors

nicemorning avatar

Watchers

 avatar

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.