Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# we do not want to copy git metadata
.git

# nor Python virtual environment
.venv

# sample images and other files
*.svs
*.pdf
*.pth
*.log
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.py[cod]
__pycache__/
_build*
build
logs
training
.*.swp
.*.swo
.eggs
.tox
.vagrant
.venv
.venv9
.DS_Store
**/.DS_Store
multic.egg-info
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ LABEL com.nvidia.volumes.needed="nvidia_driver"

LABEL maintainer="Sayat Mimar - Sarder Lab. <sayat.mimar@ufl.edu>"

CMD echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! STARTING THE BUILD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# RUN mkdir /usr/local/nvidia && ln -s /usr/local/cuda-10.0/compat /usr/local/nvidia/lib

ENV NVIDIA_VISIBLE_DEVICES all
Expand Down Expand Up @@ -67,8 +66,6 @@ RUN apt-get update && \
#apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

CMD echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! CHECKPOINT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

RUN apt-get update ##[edited]
RUN apt-get install 'ffmpeg'\
'libsm6'\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def main(args):
print(f'This is slide path: {file_path}')

print('new version')
_ = os.system("printf '\n---\n\nFOUND: [{}]\n'".format(args.input_file))
_ = os.system("echo '\n---\n\nFOUND: [{}]\n'".format(args.input_file))

cwd = os.getcwd()
print(cwd)
Expand Down
4 changes: 2 additions & 2 deletions multic/segmentationschool/Codes/InitializeFolderStructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def initializeFolderStructure(dirs,args):

folder_base = args.base_dir
base_directory_id = folder_base.split('/')[-2]
_ = os.system("printf '\nIn the base directory: {} {}\n'".format(base_directory_id,folder_base))
_ = os.system("echo '\nIn the base directory: {} {}\n'".format(base_directory_id,folder_base))

folder_project = args.project
project_directory_id = folder_project.split('/')[-2]
_ = os.system("printf '\nIn the base directory: {}{}\n'".format(project_directory_id,folder_base))
_ = os.system("echo '\nIn the base directory: {}{}\n'".format(project_directory_id,folder_base))

gc = girder_client.GirderClient(apiUrl=args.girderApiUrl)
gc.setToken(args.girderToken)
Expand Down
2 changes: 1 addition & 1 deletion multic/segmentationschool/Codes/IterativePredict_1X.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def xml_suey(wsiMask, args, classNum, downsample,glob_offset):
annots = convert_xml_json(Annotations, NAMES)
for annot in annots:
_ = gc.post(path='annotation',parameters={'itemId':args.item_id}, data = json.dumps(annot))
print('uploating layers')
print('uploading layers')
print('annotation uploaded...\n')

def get_contour_points(mask, args, downsample,value, offset={'X': 0,'Y': 0}):
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions multic/segmentationschool/Codes/wsi_loader_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def save_thumb(args,slide_loc):
print(slide_loc)
slideID,slideExt=os.path.splitext(slide_loc.split('/')[-1])
slideID,slideExt=os.path.splitext(slide_loc.split(os.sep)[-1])
slide=openslide.OpenSlide(slide_loc)
if slideExt =='.scn':
dim_x=int(slide.properties['openslide.bounds-width'])## add to columns
Expand Down Expand Up @@ -62,7 +62,7 @@ def __init__(self,args, wsi_directory=None, transform=None):

usable_slides=[]
for slide_loc in all_slides:
slideID,slideExt=os.path.splitext(slide_loc.split('/')[-1])
slideID,slideExt=os.path.splitext(slide_loc.split(os.sep)[-1])
print("working slide... "+ slideID,end='\r')

slide=openslide.OpenSlide(slide_loc)
Expand All @@ -88,9 +88,9 @@ def __init__(self,args, wsi_directory=None, transform=None):
print('Getting slide metadata and usable regions...')

usable_slides=[]
for slide_loc in all_slides:
slideID,slideExt=os.path.splitext(slide_loc.split('/')[-1])
print("working slide... "+ slideID,end='\r')
for iteration, slide_loc in enumerate(all_slides):
slideID,slideExt=os.path.splitext(slide_loc.split(os.sep)[-1])
print(f"slide {iteration + 1}/{len(all_slides)}: {slideID}" ,end='\r')

slide=openslide.OpenSlide(slide_loc)
chop_array=get_choppable_regions(slide,args,slideID,slideExt,mask_out_loc)
Expand Down
2 changes: 1 addition & 1 deletion multic/segmentationschool/Codes/xml_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def convert_xml_json(root, names, colorList=None, alpha=0.4):
for n, child in enumerate(anns):
dataDict = dict()
name = names[n]
_ = os.system("printf 'Building JSON layer: [{}]\n'".format(name))
_ = os.system("echo 'Building JSON layer: [{}]\n'".format(name))
element = []
reg = child.find('Regions')
for i in reg.findall('Region'):
Expand Down
Binary file not shown.
21 changes: 0 additions & 21 deletions multic/segmentationschool/hail.out

This file was deleted.

7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ def prerelease_local_scheme(version):
install_requires=[
# scientific packages
'nimfa>=1.3.2',
'numpy>=1.21.1',
'numpy>=1.21.1,<2.0',
'scipy>=0.19.0',
'Pillow==9.5.0',
'pandas>=0.19.2',
'imageio>=2.3.0',
# 'shapely[vectorized]',
#'opencv-python-headless<4.7',
# 'opencv-python-headless',
# 'imgaug==0.4.0',
#'sqlalchemy',
# 'matplotlib',
'pyvips',
Expand All @@ -78,6 +79,8 @@ def prerelease_local_scheme(version):
'girder-client',
# cli
'ctk-cli',
# detectron2 is installed in the dockerfile, so it needs to be commented out here
# 'detectron2 @ git+https://github.com/facebookresearch/detectron2@main', # v0.6+patches
],
license='Apache Software License 2.0',
keywords='multic',
Expand Down
2 changes: 2 additions & 0 deletions ‎.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.sh text eol=lf
*.conf text eol=lf