Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NIST-MNI/nist_mni_pipelines
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release-0.1.00
Choose a base ref
...
head repository: NIST-MNI/nist_mni_pipelines
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 5 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 30, 2024

  1. Added docker example script

    vfonov committed Jan 30, 2024
    Copy the full SHA
    a004608 View commit details
  2. Changed docker image name

    vfonov committed Jan 30, 2024
    Copy the full SHA
    19c2c2e View commit details
  3. Merged

    vfonov committed Jan 30, 2024
    Copy the full SHA
    10a52b0 View commit details

Commits on Feb 28, 2024

  1. Copy the full SHA
    109537b View commit details
  2. Copy the full SHA
    608acff View commit details
Showing with 38 additions and 4 deletions.
  1. +7 −4 ipl/model/generate_linear.py
  2. +31 −0 validation/run_validation_docker.sh
11 changes: 7 additions & 4 deletions ipl/model/generate_linear.py
Original file line number Diff line number Diff line change
@@ -95,9 +95,9 @@ def generate_linear_average(
# this will be a model for next iteration actually

# 1 register all subjects to current template
next_model =MriDataset(prefix=prefix, iter=it, name='avg')
next_model_sd =MriDataset(prefix=prefix, iter=it, name='sd')
next_model_bias=MriDataset(prefix=prefix, iter=it, name='bias')
next_model =MriDataset(prefix=prefix, iter=it, name='avg',has_mask=current_model.has_mask())
next_model_sd =MriDataset(prefix=prefix, iter=it, name='sd',has_mask=current_model.has_mask())
next_model_bias=MriDataset(prefix=prefix, iter=it, name='bias',has_mask=current_model.has_mask())

transforms=[]

@@ -326,7 +326,10 @@ def generate_linear_model_csv(input_csv,model=None,mask=None,work_prefix=None,op
with open(input_csv, 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quoting=csv.QUOTE_NONE)
for row in reader:
internal_sample.append(MriDataset(scan=row[0],mask=row[1]))
if len(row)>=2:
internal_sample.append(MriDataset(scan=row[0],mask=row[1]))
else:
internal_sample.append(MriDataset(scan=row[0]))

internal_model=None
if model is not None:
31 changes: 31 additions & 0 deletions validation/run_validation_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -e -x


FIELD=1.5
PRL=4
THREADS=4
out=output_docker
CLEANUP=YES
## number of threads should be less then PRL (parallel processes)


cat - <<END
######################################################################
# Running validation dataset using apptainer, results will be in $out directory
#
# WARNING: apptainer should have at least 1Gb of available disk space for /tmp
# check sessiondir max size parameter in /etc/apptainer/apptainer.conf or ~/.apptainer.conf
#
#
# Using parameters for ${FIELD}T scanner, ${PRL} parallel processes, maximum ${THREADS} threads
#
#######################################################################
END


docker run --rm --shm-size=10gb -v $(pwd):/data -w /data --user $(id -u):$(id -g) \
--env PRL,THREADS=$THREADS,RAY_memory_monitor_refresh_ms=0,CLEANUP=$CLEANUP \
nistmni/nist_mni_pipeline:0.1.00 subject43.csv output_docker