Skip to content

Commit

Permalink
resolving readme issue; updated tests.sh
Browse files Browse the repository at this point in the history
Former-commit-id: 37ae3ca092a709f420a503584103457db6840785
  • Loading branch information
spoonsso committed Jan 25, 2021
1 parent 76bb193 commit 696b4d8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 58 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,19 @@ cd dannce

2. If you do not already have it, install [Anaconda](https://www.anaconda.com/products/individual).

<<<<<<< HEAD
3. Set up a new Anaconda environment with the following configuration: \
=======
2. Set up a new Anaconda environment with the following configuration: \
>>>>>>> sampleID_fix
`conda create -n dannce python=3.7 cudatoolkit=10.1 cudnn ffmpeg`

4. Activate the new Anaconda environment: \
`conda activate dannce`

<<<<<<< HEAD
5. Install PyTorch: \
`conda install pytorch=1.7 -c pytorch`

6. Update setuptools: \
`pip install -U setuptools`

7. Install DANNCE with the included setup script from within the base repository directory: \
=======
4. Install PyTorch: \
`conda install pytorch=1.7 -c pytorch`

5. Update setuptools: \
`pip install -U setuptools`

6. Install DANNCE with the included setup script from within the base repository directory: \
>>>>>>> sampleID_fix
`pip install -e .`

Then you should be ready to try the quickstart demo! \
Expand Down
6 changes: 1 addition & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
"scikit-image",
"matplotlib",
"opencv-python",
<<<<<<< HEAD
"tensorflow==2.3.1",
=======
"tensorflow==2.3.0",
>>>>>>> sampleID_fix
"torch",
"numpy==1.18"
],
Expand All @@ -29,4 +25,4 @@
"com-predict = dannce.cli:com_predict_cli",
]
},
)
)
78 changes: 39 additions & 39 deletions tests/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,56 +22,56 @@ python setup.py install

cd tests/configs

# echo "Testing COMfinder training"
# com-train config_com_mousetest.yaml --com-finetune-weights=../../demo/markerless_mouse_1/COM/weights/
echo "Testing COMfinder training"
com-train config_com_mousetest.yaml --com-finetune-weights=../../demo/markerless_mouse_1/COM/weights/

# echo "Testing COMfinder training w/ mono"
# com-train config_com_mousetest.yaml --mono=True
echo "Testing COMfinder training w/ mono"
com-train config_com_mousetest.yaml --mono=True

# echo "Testing COMfinder prediction"
# com-predict config_com_mousetest.yaml
# python ../compare_predictions.py ../touchstones/COM3D_undistorted_masternn.mat ../../demo/markerless_mouse_1/COM/predict_test/com3d.mat 0.001
echo "Testing COMfinder prediction"
com-predict config_com_mousetest.yaml
python ../compare_predictions.py ../touchstones/COM3D_undistorted_masternn.mat ../../demo/markerless_mouse_1/COM/predict_test/com3d.mat 0.001

# echo "Testing COMfinder prediction, 3 cams"
# #cp ./label3d_temp_dannce_3cam.mat ./alabel3d_temp_dannce.mat
# com-predict config_com_mousetest.yaml --downfac=4
echo "Testing COMfinder prediction, 3 cams"
#cp ./label3d_temp_dannce_3cam.mat ./alabel3d_temp_dannce.mat
com-predict config_com_mousetest.yaml --downfac=4

echo "Testing COMfinder prediction, 5 cams"
cp ./label3d_temp_dannce_5cam.mat ./alabel3d_temp_dannce.mat
com-predict config_com_mousetest.yaml --downfac=2

# echo "Testing DANNCE training, finetune_MAX"
# dannce-train config_mousetest.yaml --net-type=MAX --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.MAX/
echo "Testing DANNCE training, finetune_MAX"
dannce-train config_mousetest.yaml --net-type=MAX --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.MAX/

# echo "Testing DANNCE training, finetune_AVG"
# dannce-train config_mousetest.yaml --net-type=AVG --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/
echo "Testing DANNCE training, finetune_AVG"
dannce-train config_mousetest.yaml --net-type=AVG --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/

# echo "Testing DANNCE training, AVG net from scratch"
# dannce-train config_mousetest.yaml --net=unet3d_big_expectedvalue --train-mode=new --n-channels-out=22
echo "Testing DANNCE training, AVG net from scratch"
dannce-train config_mousetest.yaml --net=unet3d_big_expectedvalue --train-mode=new --n-channels-out=22

# echo "Testing DANNCE training, MAX net from scratch"
# dannce-train config_mousetest.yaml --net=unet3d_big --train-mode=new --n-channels-out=22
echo "Testing DANNCE training, MAX net from scratch"
dannce-train config_mousetest.yaml --net=unet3d_big --train-mode=new --n-channels-out=22

# echo "Testing DANNCE training, AVG net continued"
# dannce-train config_mousetest.yaml --net-type=AVG --train-mode=continued --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/train_results/AVG/
echo "Testing DANNCE training, AVG net continued"
dannce-train config_mousetest.yaml --net-type=AVG --train-mode=continued --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/train_results/AVG/

# echo "Testing DANNCE training, MAX net continued"
# dannce-train config_mousetest.yaml --net=finetune_MAX --train-mode=continued --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/train_results/
echo "Testing DANNCE training, MAX net continued"
dannce-train config_mousetest.yaml --net=finetune_MAX --train-mode=continued --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/train_results/

# echo "Testing DANNCE training, AVG MONO from scratch"
# dannce-train config_mousetest.yaml --net-type=AVG --train-mode=new --net=unet3d_big_expectedvalue --mono=True --n-channels-out=22
echo "Testing DANNCE training, AVG MONO from scratch"
dannce-train config_mousetest.yaml --net-type=AVG --train-mode=new --net=unet3d_big_expectedvalue --mono=True --n-channels-out=22

# echo "Testing DANNCE training, AVG MONO from scratch w/ augmentation"
# dannce-train config_mousetest.yaml --net-type=AVG --train-mode=new --net=unet3d_big_expectedvalue --mono=True --n-channels-out=22 --augment-brightness=True --augment-continuous-rotation=True --augment-hue=True
echo "Testing DANNCE training, AVG MONO from scratch w/ augmentation"
dannce-train config_mousetest.yaml --net-type=AVG --train-mode=new --net=unet3d_big_expectedvalue --mono=True --n-channels-out=22 --augment-brightness=True --augment-continuous-rotation=True --augment-hue=True

# echo "Testing DANNCE training, AVG MONO finetune"
# dannce-train config_mousetest.yaml --net-type=AVG --mono=True --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.AVG.MONO/
echo "Testing DANNCE training, AVG MONO finetune"
dannce-train config_mousetest.yaml --net-type=AVG --mono=True --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.AVG.MONO/

# echo "Testing DANNCE training, AVG MONO finetune"
# dannce-train config_mousetest.yaml --net-type=AVG --mono=True --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.AVG.MONO/ --drop-landmark=[5,7]
echo "Testing DANNCE training, AVG MONO finetune"
dannce-train config_mousetest.yaml --net-type=AVG --mono=True --dannce-finetune-weights=../../demo/markerless_mouse_1/DANNCE/weights/weights.rat.AVG.MONO/ --drop-landmark=[5,7]

# echo "Testing DANNCE prediction, MONO"
# dannce-predict config_mousetest.yaml --net-type=AVG --dannce-predict-model=../../demo/markerless_mouse_1/DANNCE/train_test/fullmodel_weights/fullmodel_end.hdf5 --mono=True
echo "Testing DANNCE prediction, MONO"
dannce-predict config_mousetest.yaml --net-type=AVG --dannce-predict-model=../../demo/markerless_mouse_1/DANNCE/train_test/fullmodel_weights/fullmodel_end.hdf5 --mono=True

# 32 NVOX ---------
#MONO
Expand All @@ -94,14 +94,14 @@ com-predict config_com_mousetest.yaml --downfac=2

# -----------

# cp ./label3d_temp_dannce.mat ./alabel3d_temp_dannce.mat
# echo "Testing DANNCE AVG prediction"
# dannce-predict config_mousetest.yaml --net-type=AVG
# python ../compare_predictions.py ../touchstones/save_data_AVG_torch_nearest.mat ../../demo/markerless_mouse_1/DANNCE/predict_test/save_data_AVG0.mat 0.001
cp ./label3d_temp_dannce.mat ./alabel3d_temp_dannce.mat
echo "Testing DANNCE AVG prediction"
dannce-predict config_mousetest.yaml --net-type=AVG
python ../compare_predictions.py ../touchstones/save_data_AVG_torch_nearest.mat ../../demo/markerless_mouse_1/DANNCE/predict_test/save_data_AVG0.mat 0.001

# echo "Testing DANNCE MAX prediction"
# dannce-predict config_mousetest.yaml --net-type=MAX --expval=False --dannce-predict-model=../../demo/markerless_mouse_1/DANNCE/train_results/weights.12000-0.00014.hdf5
# python ../compare_predictions.py ../touchstones/save_data_MAX_torchnearest_newtfroutine.mat ../../demo/markerless_mouse_1/DANNCE/predict_test/save_data_MAX0.mat 0.001
echo "Testing DANNCE MAX prediction"
dannce-predict config_mousetest.yaml --net-type=MAX --expval=False --dannce-predict-model=../../demo/markerless_mouse_1/DANNCE/train_results/weights.12000-0.00014.hdf5
python ../compare_predictions.py ../touchstones/save_data_MAX_torchnearest_newtfroutine.mat ../../demo/markerless_mouse_1/DANNCE/predict_test/save_data_MAX0.mat 0.001


echo "PASSED WITHOUT ERROR"

0 comments on commit 696b4d8

Please sign in to comment.