diff --git a/README.md b/README.md index b86a93c..844c61e 100644 --- a/README.md +++ b/README.md @@ -34,17 +34,12 @@ 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` @@ -52,15 +47,6 @@ cd dannce `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! \ diff --git a/setup.py b/setup.py index 96b021c..49c6dda 100644 --- a/setup.py +++ b/setup.py @@ -13,11 +13,7 @@ "scikit-image", "matplotlib", "opencv-python", -<<<<<<< HEAD "tensorflow==2.3.1", -======= - "tensorflow==2.3.0", ->>>>>>> sampleID_fix "torch", "numpy==1.18" ], @@ -29,4 +25,4 @@ "com-predict = dannce.cli:com_predict_cli", ] }, -) +) \ No newline at end of file diff --git a/tests/tests.sh b/tests/tests.sh index c980187..de77c19 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -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 @@ -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"