Skip to content

Commit

Permalink
source entrypoint.h before running the notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Yixuan Wang committed Sep 30, 2021
1 parent 964194e commit 12b6edd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ To prevent the repo from growing in size, recommend always "restart and clear ou

### Build on conda

Installation using the following command
```
pip3 install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
```
Using the environment through the following command
```
source docker/entrypoint.sh
```
31 changes: 22 additions & 9 deletions dense_correspondence/dataset/simple_datasets_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,28 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"sys.path.append(\"../..\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Using SpartanDataset:\n",
" - in train mode\n",
" - number of scenes 11\n",
" - total images: 2851\n"
"ename": "ModuleNotFoundError",
"evalue": "No module named 'pytorch_segmentation_detection'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_5273/718444074.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mspartan_dataset_masked\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSpartanDataset\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdense_correspondence_manipulation\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mutils\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mutils\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mutils\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0madd_dense_correspondence_to_python_path\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdense_correspondence\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_finder\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mcorrespondence_finder\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/pytorch-dense-correspondence/dense_correspondence/dataset/spartan_dataset_masked.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mdense_correspondence\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdense_correspondence_dataset_masked\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mDenseCorrespondenceDataset\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mImageType\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mlogging\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m~/pytorch-dense-correspondence/dense_correspondence/dataset/dense_correspondence_dataset_masked.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mtorchvision\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtransforms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mpytorch_segmentation_detection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtransforms\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mComposeJoint\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 21\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdense_correspondence\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_finder\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mcorrespondence_finder\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdense_correspondence\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_tools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcorrespondence_augmentation\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mcorrespondence_augmentation\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'pytorch_segmentation_detection'"
]
}
],
Expand Down Expand Up @@ -185,7 +198,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -199,7 +212,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
"version": "3.7.11"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -e

export DATA_DIR=~/data
export DATA_DIR=~/pytorch-dense-correspondence/data
export DC_DATA_DIR=$DATA_DIR/pdc
export DC_SOURCE_DIR=~/code
export DC_SOURCE_DIR=~/pytorch-dense-correspondence
export PDC_BUILD_DIR=$DC_SOURCE_DIR/build
export POSER_BUILD_DIR=$PDC_BUILD_DIR/poser

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ plyfile
pandas
tensorflow
future
typing
typing
pyyaml

0 comments on commit 12b6edd

Please sign in to comment.