Git Product home page Git Product logo

ucvme-implementation's Introduction

UCVME-Implementation

Here I am going to reproduce the results of an ML Article

Source Article

The main resource is https://github.com/xmed-lab/UCVME.

Author

Mohammad Javad Maheronnaghsh

Goal

The goal is to reproduce the results of an article, and report the results and the way and details of doing that in this repository. Thie name of the article is: "Semi-Supervised Deep Regression with Uncertainty Consistency and Variational Model Ensembling via Bayesian Neural Networks".

Common Errors

Proxy Error

Due to the use of proxies in Iran, when I wanted to clone from https://github.com/xmed-lab/UCVME.git, I faced a problem: Unable to clone because of proxy.com. To solve this problem, I entered "git config --global --unset http.proxy" in gitbash and this problem is resolved. Now I can clone from the main repository.

Picture Not Found Exception

This may happen because we have forgotten to donwload and place the dataset in the correct place.

CV2

To install CV2 package it is neccessary to install OpenCV in python (not cv2), because there is no module named "cv2" that is recognizable for Pycharm.

Process

Clone

First of all, I have cloned from the main repository (https://github.com/xmed-lab/UCVME.git) in Pycharm (locally).

Dataset Download

In this step, I have downloaded the dataset from https://susanqq.github.io/UTKFace/. In this webpage, I have downloaded the "Aligned&Cropped Faces" zip file, then etracted it and copied and pasted the images into the UTKFace directory in the cloned ptoject. Note that if we forget to download the dataset, we are going to face an exception (Not Found Exception).

Intalling Libraries

I opened the "init.py" file and installed the neccessary (and not-installed) libraries to my directory. This task can be done in 3 ways: -- Use another Configuration in Pycharm that satisfies the needed libraries. -- Intall the libraries by entering the proper command in command line. -- Simply Click "Alt+Enter" on the red part of the code (which is the not-satisfied library) and click on "Install Package".

It is also neccessary to add the libraries to "requirements.txt" file. image

Training

We can start training process by writing this command (python3 ucvme_age.py --output='out') in the terminal. When we start trainig, first resnet starts to download: image Then the images are trained, etc. as wee can see in the below screenshot. image

Testing

After entering this (python3 ucvme_age.py --output='out' --test_only) in the terminal, we can see the below picture that the pictures are on the test: image

Outputs

We can check the outputs of our code running in the "out" directory that I have created in my own project. image There is a "log.csv" that is a report of want we have run.

Details

  • I have done these processes in Windows 10. It can be done in Linux, too.

Improvements and Suggestions

  • I suggest to place the dataset in the main github repository, so we can train and test the model easily.
  • I suggest to use another function instead of "imread" because Pycharm preferes to use the other methods.
  • I suggest to create different repositores so we can update and add some comments to the github repository. In the current version, we only have a main branch that is not good for improving big projects and codes.

ucvme-implementation's People

Contributors

mjmaher987 avatar

Stargazers

 avatar Mohammad Hossein Shafizadegan avatar  avatar  avatar  avatar

Watchers

 avatar  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.