Aneurysm_Detection
Aneurysm_Detection copied to clipboard
Possible Performance Improvement
Hi! I was browsing repos that were using cc3d recently to see how people are using it. I noticed in your repo that there was a spot that looked slow that could be improved fairly easily.
https://github.com/connectomicslab/Aneurysm_Detection/blob/70251d9c0d9d30385ec777c575e839a9dc12b2f7/dataset_creation/utils_dataset_creation.py#L989-L996
largest_conn_comp_binary = cc3d.largest_k(labels_out, k=1)
If that's not useful to your project, please feel free to ignore this as I don't want to waste your time. Good luck!
Hi @william-silversmith! thanks for pointing this out, and for developing cc3d! I find it very useful.
For the moment, I saw that the newest version of cc3d requires python 3.7, while I still have everything on 3.6. I will keep this in mind when upgrading to 3.7 :)
py36 reached end of life so it's not a bad idea to upgrade, other dependencies may become difficult to use in the nearish future.
If you check out the cc3d repo, you can likely just copy paste the code for nearest_k in cc3d.pyx as none of it requires cythonized code, it's just calling other cc3d functions.
Best of luck on your project! Will
On Thu, May 26, 2022, 7:23 AM Tommaso Di Noto @.***> wrote:
Hi @william-silversmith https://github.com/william-silversmith! thanks for pointing this out, and for developing cc3d! I find it very useful.
For the moment, I saw that the newest version of cc3d requires python 3.7, while I still have everything on 3.6. I will keep this in mind when upgrading to 3.7 :)
— Reply to this email directly, view it on GitHub https://github.com/connectomicslab/Aneurysm_Detection/issues/2#issuecomment-1138429017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATGQSNDCPIDG2QVRJJLFKTVL5NMLANCNFSM5W7NXBPQ . You are receiving this because you were mentioned.Message ID: @.***>
You are right! I will upgrade and make the modifications. Leaving this issue open as a reminder until I am done :)
Thanks again Tommaso