├── .gitignore ├── src ├── CcLogo.png ├── paper.png ├── brokenlink.png ├── leaderboard.png ├── numberOfDatasets.png ├── checkLinks.py └── datasetNumberImage.py └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | venv/ -------------------------------------------------------------------------------- /src/CcLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-aryayi/Medical-Imaging-Datasets/HEAD/src/CcLogo.png -------------------------------------------------------------------------------- /src/paper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-aryayi/Medical-Imaging-Datasets/HEAD/src/paper.png -------------------------------------------------------------------------------- /src/brokenlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-aryayi/Medical-Imaging-Datasets/HEAD/src/brokenlink.png -------------------------------------------------------------------------------- /src/leaderboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-aryayi/Medical-Imaging-Datasets/HEAD/src/leaderboard.png -------------------------------------------------------------------------------- /src/numberOfDatasets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-aryayi/Medical-Imaging-Datasets/HEAD/src/numberOfDatasets.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Mohammad Aryayi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/checkLinks.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This code is for checking the links in the readme file 3 | ''' 4 | 5 | import re 6 | import requests 7 | 8 | def extract_links_from_readme(file_path): 9 | with open(file_path, 'r', encoding='utf-8') as file: 10 | readme_content = file.read() 11 | 12 | link_pattern = re.compile(r'href="(.*?)"') 13 | links = link_pattern.findall(readme_content) 14 | 15 | return links 16 | 17 | 18 | def check_links(links): 19 | headers = { 20 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3' 21 | } 22 | for link in links: 23 | try: 24 | response = requests.get(link, allow_redirects=True, 25 | headers=headers) 26 | if response.status_code == 404: 27 | print(f" ** 404 Not Found: {link}") 28 | else: 29 | None # Link is OK, return None 30 | except requests.RequestException as e: 31 | print(f" ** Error checking {link}: {e}") 32 | 33 | 34 | def check_for_duplicates(links): 35 | duplicated_links = [ 36 | 'https://arxiv.org/abs/1811.02629', 37 | 'https://academic.oup.com/gigascience/article/7/6/giy065/5026175', 38 | 'https://pubs.rsna.org/doi/10.1148/radiol.2021203957', 39 | 'https://ieeexplore.ieee.org/document/6975210', 40 | 'https://ieeexplore.ieee.org/document/8458220', 41 | 'https://pubs.rsna.org/doi/10.1148/radiol.12111607', 42 | 'https://www.cell.com/cell/fulltext/S0092-8674(18)30154-5', 43 | ] #List of links that relate to some datasets 44 | 45 | seen_links = {} 46 | for link in links: 47 | if link in duplicated_links: 48 | pass 49 | elif link in seen_links: 50 | seen_links[link] += 1 51 | else: 52 | seen_links[link] = 1 53 | 54 | duplicates_found = False 55 | for link, count in seen_links.items(): 56 | if count > 1: 57 | if not duplicates_found: 58 | print(" ** Duplicate links found:") 59 | duplicates_found = True 60 | print(f" ** {link} appears {count} times") 61 | 62 | if not duplicates_found: 63 | print(" ** No duplicate links found") 64 | 65 | 66 | 67 | file_path = './README.md' 68 | links = extract_links_from_readme(file_path) 69 | check_links(links) 70 | check_for_duplicates(links) 71 | -------------------------------------------------------------------------------- /src/datasetNumberImage.py: -------------------------------------------------------------------------------- 1 | ''' 2 | This code is for plotting the image of the number 3 | of datasets in the readme file. 4 | 5 | The main code is from the reference below, but I 6 | added some features and personalized it. 7 | 8 | Simone Centellegher - 9 | https://scentellegher.github.io/visualization/2018/10/10/beautiful-bar-plots-matplotlib.html 10 | (Access: 22/04/2024) 11 | ''' 12 | 13 | 14 | import pandas as pd 15 | import matplotlib.pyplot as plt 16 | import numpy as np 17 | # %matplotlib inline 18 | 19 | # set font 20 | plt.rcParams['font.family'] = 'sans-serif' 21 | plt.rcParams['font.sans-serif'] = 'Comic Sans MS' 22 | 23 | # set the style of the axes and the text color 24 | plt.rcParams['axes.edgecolor']='#333F4B' 25 | plt.rcParams['axes.linewidth']=0.8 26 | plt.rcParams['xtick.color']='#333F4B' 27 | plt.rcParams['ytick.color']='#333F4B' 28 | plt.rcParams['text.color']='#333F4B' 29 | 30 | 31 | data = { 32 | 'Brain': 182, 33 | 'Ears, Nose, Teeth, and Throat': 21, 34 | 'Eyes': 38, 35 | 'Bowel': 19, 36 | 'Breast': 40, 37 | 'Heart and Blood Vessels': 59, 38 | 'Kidneys and Urinary Tract': 12, 39 | 'Liver': 13, 40 | 'Lungs': 97, 41 | 'Bones': 17, 42 | 'Joints': 10, 43 | 'Female Reproductive Organs': 22, 44 | 'Male Reproductive Organs': 17, 45 | 'Lymph Nodes': 9, 46 | 'Skin': 18, 47 | 'Multi Organs Datasets' : 70, 48 | 'Animals' : 14, 49 | } 50 | 51 | df = pd.DataFrame.from_dict(data, orient='index', columns=['number']) 52 | # df = df.sort_values(by='number') 53 | df = df. iloc[::-1] 54 | 55 | print(f"Number of Dataset: {df['number'].sum()}") 56 | # print(f"Maximum Number: {df['number'].max()}") 57 | 58 | fig, ax = plt.subplots(figsize=(8,4.2)) 59 | 60 | range_y=list(range(1,len(df.index)+1)) 61 | 62 | plt.hlines(y=range_y, xmin=0, xmax=df['number'], color='#0080ff', alpha=0.2, linewidth=5) 63 | plt.plot(df['number'], range_y, "o", markersize=5, color='#0080ff', alpha=0.6) 64 | for y, x in enumerate(df['number']): 65 | # plt.annotate(str(x), xy=(x+1, y+1) ,va='center') 66 | plt.text(x+1, y+0.8, str(x), color = '#0080ff') 67 | 68 | # set labels 69 | ax.set_xlabel('Number', fontsize=15, fontweight='black', color = '#333F4B') 70 | ax.set_ylabel('') 71 | 72 | # set axis 73 | ax.tick_params(axis='both', which='major', labelsize=12) 74 | plt.yticks(range_y, df.index) 75 | plt.xticks(np.arange(0, np.ceil(df['number'].max()*1.05), step=20)) 76 | ax.set_xlim(0,np.ceil(df['number'].max()*1.1)) 77 | 78 | # add an horizonal label for the y axis 79 | fig.text(0.18, 0.92, f"Number of Datasets Listed: {df['number'].sum()}" , fontsize=15, fontweight='black', color = '#333F4B') 80 | 81 | # change the style of the axis spines 82 | ax.spines['top'].set_visible(False) 83 | ax.spines['right'].set_visible(False) 84 | ax.spines['left'].set_bounds((1, len(range_y))) 85 | ax.spines['left'].set_position(('outward', 8)) 86 | ax.spines['bottom'].set_position(('outward', 5)) 87 | 88 | plt.savefig('src/numberOfDatasets.png', dpi=300, bbox_inches='tight') 89 | #plt.show() --------------------------------------------------------------------------------