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

Very nice job. #32

Closed
gabrielmax1 opened this issue Mar 8, 2023 · 3 comments
Closed

Very nice job. #32

gabrielmax1 opened this issue Mar 8, 2023 · 3 comments
Labels
comment A general comment on the repo

Comments

@gabrielmax1
Copy link

First of all, let me congratulate you for the job that you have done here, is excellent, the dissertation is so well explained, complex terminologies are turned into a simple read, and they stay in your mind.
I'm doing my Final year project lately, and I'm on a hunt for a well-structured repository to take a piece and use it as my idea (with the given credit and citation obviously). There are not so many people out there trying to do what you also did, which is the simple detection of an abnormality (tumour or cancer) as a prediction, hence multi-classification that actually has solid results.
I found the repository intriguing too, and although I have fought hard (more than a month) to implement it and make it work, I wasn't able to. I tried both Win (10) and Linux (Ubuntu). I tried running your script, I tried cloning it and then installing the requirements, but when I try to run it, is as if it wasn't pointing at the right virtual environment. Missing libraries that I had installed already.
I tried many other repositories to see how far other people have come, and I never encountered such an issue. I'm sure is just me and is just related to the way it is setup.

Would be a pleasure hearing from you, all the best

Thank you for your time

Regards,
Gabriele

@Adamouization Adamouization added the comment A general comment on the repo label Mar 9, 2023
@Adamouization
Copy link
Owner

Hi Gabriele,

Thanks for the message, I really appreciate it. I'm glad the dissertation was of help to you!

On the subject of the code, I am aware that it isn't the easiest installation and setup process out there (I recall I had about 2.5 months for the whole dissertation, of which I took 5 weeks for the coding part and the rest for the dissertation).

So my first guidance for you is to check out this more updated version of the repo: https://github.com/Adamouization/Breast-Cancer-Detection-Mammogram-Deep-Learning-Publication.
I have been working on transforming this dissertation into a publishable paper (which was accepted earlier this year and will soon be published in PLOS ONE), which means I had to revisit my code to make it more reproducible. So the code there might bring you more luck.

Without knowing more details it is a bit hard for me to know what's the cause of the errors. But from what I remember, I used a computer provided by the university that had a GPU and 128Gb of RAM, and ran on a Linux-based distribution (forgot which, but it wasn't Ubuntu, it was a more lightweight one, perhaps Fedora?). The main complexity came from hooking up the GPU to Tensorflow for it to be recognised. To check that the GPU is seen by Tensorflow and is available, you can run code like this:

import tensorflow as tf


print("Available devices: ", tf.config.experimental.list_physical_devices())

physical_gpu = tf.config.experimental.list_physical_devices('GPU')
print("Num GPUs Available: ", len(physical_gpu))
print("Device details: ", tf.config.experimental.get_device_details(physical_gpu[0]))
tf.config.experimental.set_memory_growth(physical_gpu[0], True)

Another option would be to instead try to tackle this from a clean slate. as in you start from an empty python environment, and install lirbaries one at a time to get the functionality you require. So the first thing would be to get tensorflow to work on a GPU in that new virtual environment.

And the last option I have in mind would be to use cloud computing tools (there are many out there). I personally have successfully used Google Colab or Saturn Cloud. They come with images that have Python already installed, Tensorflow or Pytorch based on your preference, and more importantly a GPU already setup. So it basically works out of the box.

Let me know if any of the above work and good luck on your project!

Adam

@gabrielmax1
Copy link
Author

gabrielmax1 commented Mar 9, 2023 via email

@Adamouization Adamouization pinned this issue Mar 15, 2023
@Adamouization
Copy link
Owner

Hi Gabriele, sorry for the late reply! Hope you're doing better now. To try to help with some of your points:

At this point, I will try once again with the new repository, one issue
that I must say I discovered only late is that Tensorflow has discontinued
Tensorflow-gpu, hence they incorporated everything into Tensorflow for both
CPU and GPU
I should also mention that, to instal it locally, I used Anaconda, and for
each time I created a new environment with the right version of python,
tensorflow, cudnn and cuda. But after installing all the libraries from the
requirement file (only 1 is missing tf-nightly).

Since the requirements file is a bit outdated, I would instead start with a fresh conda environment and install python libraries manually to get the code to work, rather than installing them based on the requirements.txt.

And if anything if missing from conda, like tf-nightly, try installing via PyPI, it will work even if you are in a conda environment. So for example you could do pip install tf-nightly within your conda environment.

But when I try to run the main.py as per instructions, is like is not
pointing to the right environment, at first I thought it was Windows,
however, this happened on Linux distribution too.
Just to give you a more rich idea of what I did so far.

If you don't think it's pointing in the right environment, make sure the Python path is the one of your environment. You can use this to make sure it's the correct path:

import sys
print(sys.prefix)

Hope this helps and that you'll get your code working!

Adam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comment A general comment on the repo
Projects
None yet
Development

No branches or pull requests

2 participants