-
Notifications
You must be signed in to change notification settings - Fork 26
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
Comments
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. 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 |
Hello Adam,
Thank you for your prompt response, and for the advice. Let me start by
saying, sorry If I wasn't too clear with my issue, unfortunately, I'm still
a bit sick, so not 100% yet (nothing to worry about just flu).
I tried all of the above options already, I actually started to break down
your project moving it into Google Colab to gain the possibility to train
it, and move forward. sort of as you advised it, but is not that easy given
the fact that many files depend on other files and the libraries sometimes
don't help either.
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).
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.
I hope that makes sense
Looking forward to hearing from you
Regards,
Gabriele
…On Thu, 9 Mar 2023 at 09:35, Adam Jaamour ***@***.***> wrote:
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
—
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APVBB4V2LOYK7OMI4Q43AILW3GP7XANCNFSM6AAAAAAVUKVXHQ>
.
You are receiving this because you authored the thread.Message ID:
<Adamouization/Breast-Cancer-Detection-Mammogram-Deep-Learning/issues/32/1461661887
@github.com>
|
Hi Gabriele, sorry for the late reply! Hope you're doing better now. To try to help with some of your points:
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 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
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 |
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
The text was updated successfully, but these errors were encountered: