Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic recognition - 45799930 #437

Open
wants to merge 28 commits into
base: topic-recognition
Choose a base branch
from

Commits on Oct 13, 2022

  1. Initial Commit - Folder Created

    The initial setup has been done on pycharm and a folder in the recognition directory has been added called 45799930 (my student number). All files required for this assignment have been added under this directory.
    sully36 committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    648ef2d View commit details
    Browse the repository at this point in the history
  2. Setup of Datasets

    Class code for importing the datasets and converting the filenames into TensorFlow datasets
    sully36 committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    d06c4b6 View commit details
    Browse the repository at this point in the history
  3. Fix Bugs in Data Setup

    The initialisation of class variables was incorrect, as well as the file path names for the folders containing the data. Also added in a check to make sure the truth for every set is the same size of that set.
    sully36 committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    72af4ad View commit details
    Browse the repository at this point in the history
  4. Doc Strings added for dataset.py

    Added proper docstrings for the function in the class. I also added some new class variables so we can access the width and height of the images.
    sully36 committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    0e44644 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. Initial Model Function without Segmentation Layer

    The function to create the model has been created with the improved UNet structure.  I have done the downsampling through the 5 layers and upsampling back up. But have not implemented the segmentation layer and concatenated them from layers 3, 2 and 1, which are at the end of the structure.
    sully36 committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    1d96d81 View commit details
    Browse the repository at this point in the history
  2. Added seperate context_module function

    Created context_module function as this cleaned up the create_module function as it was getting messy and hard to understand. Made sure to normalise and have the dropout layer in between the two conv layers.
    sully36 committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    0415f3e View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2022

  1. Added separate upsample_module function

    Added module function for upsampling to clean up the create_model function.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    e59563f View commit details
    Browse the repository at this point in the history
  2. Completed Encoder Structure

    Based on the improved UNet need to change the Maxpooling to a Conv with a stride of 2. I also needed to add the element-wise sum for the encoder side of things. The encoder structure should be complete now.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    9a122bd View commit details
    Browse the repository at this point in the history
  3. Added and Edited Documentation

    Added documentation for the new functions created and changed the spacing of the encoder part of create_module so it corresponds with the layers on the improved UNet. structure.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    a251fc0 View commit details
    Browse the repository at this point in the history
  4. Finished decoder of model

    Added localisation module function to clean up create module function. I changed the concatenate lines as they were doing one of the wrong variables. Added the segmentation layers as well at the end, the element-wise sum of them and added the softmax layer to finish off the module.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    c90a00f View commit details
    Browse the repository at this point in the history
  5. README Initial Structure

    Title and subtitles added to README.md based on requirements stated in the task sheet in the README description and its marking criteria.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    bf5f872 View commit details
    Browse the repository at this point in the history
  6. README Address Reproducibility info

    Added information for the address reproducibility for this assignment to run in the README.md file.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    f19d20d View commit details
    Browse the repository at this point in the history
  7. train.py initial class structure

    Imported needed functions from modules and classes from datasets. Also calls these in the init method so that immediately we get the dataset and module created.
    sully36 committed Oct 19, 2022
    Configuration menu
    Copy the full SHA
    fc96a9c View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2022

  1. Dice Similarity Added

    A function was created in train.py, which calculates the dice similarity coefficient of two images that will be passed in as tensors. This is based on the link in the task sheet.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    4a63ca7 View commit details
    Browse the repository at this point in the history
  2. Pre Processing Data Function

    Found the need to preprocess the data because the dataset in past has just contained the path to the images so created this method so that we can map the data to the right location.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    9bb0293 View commit details
    Browse the repository at this point in the history
  3. Immediately Preprocess Data

    Changed download_dataset so that it automatically processes the data. This then meant class variable names were changed, which had a flow-on effect through the class and separated the processing of the image and the truth as I would otherwise have to change my dataset into a tuple for the data and truth sets.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    b99fbc3 View commit details
    Browse the repository at this point in the history
  4. README Pre-processing

    Added key information on the preprocessing of the data that was just compleated. Also added some small changes, such as Author and student ID and did some more basic formatting to make it clearer to read.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    bd0662d View commit details
    Browse the repository at this point in the history
  5. Doc Strings dataset.py

    added doc strings to the functions that were missing their own while modifying others that had changed since they were first written.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    d796b4e View commit details
    Browse the repository at this point in the history
  6. dataset 2D tensor

    I had problems trying to implement model.fit and using batch with the current structure of the data, so I found out it would be easier if used from_tensor_slices to make them into tensors with two elements.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    f21b782 View commit details
    Browse the repository at this point in the history
  7. Tensor Slices Zero Error Fixed

    When running, there was a problem with using from_tensor_slices twice as it had one of the dimensions as none, and we couldn’t combine two tensors like that. It was changed so when the tensor slices are first called it forms two-dimensional tensors. This means the pre_processing had to be combined as passing it into the map with include both the image and truth
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    a6f89e5 View commit details
    Browse the repository at this point in the history
  8. Modules errors fixed

    The initial element-wise sum was trying to sum up the wrong variable, so they were in incompatible shapes. Segmentation layers when trying to add were also in the wrong shaps so added upsampling where required.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    e9585ef View commit details
    Browse the repository at this point in the history
  9. Train Model Print Added

    Function created to print out the result of the epochs once the model has been trained. Changed to functions rather than a class as the class structure is not required and makes it more complex.
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    41d998d View commit details
    Browse the repository at this point in the history
  10. Splicing Training Dataset

    Instead of using all the datasets, as there is already a large amount of data in the training dataset, we split that dataset into three o create all the testing, training and validating data sets. The same was done for the truth. This them was updated in the readme
    sully36 committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    a90f633 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2022

  1. Split Information Added

    Added all the information and justification on the split of the datasets in the readme file.
    sully36 committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    6a26a71 View commit details
    Browse the repository at this point in the history
  2. Description Problem Algorithm Solves

    Added information for what the algorithm is that we are using and the problem that it solves to the readme. Images were added to the readme so a images folder was also added for ease and cleanliness.
    sully36 committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    aea443a View commit details
    Browse the repository at this point in the history
  3. ReadMe filled in

    Added graphs for the output of the program and added the rest of the information for the read me
    sully36 committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    35089fc View commit details
    Browse the repository at this point in the history
  4. Implemented Main

    Added the main function in predict and modified the print of the history as accuracy has changed to the dice coefficent.
    sully36 committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    2fa52de View commit details
    Browse the repository at this point in the history
  5. Input vs Filter Error Fixed

    Changed so that the original image should have 3 channels so that it is an RBG image. This seemed to fix the error that would only occur sometimes.
    sully36 committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    7b86aea View commit details
    Browse the repository at this point in the history