Skip to content

Commit

Permalink
Fixed bugs in img_lms_pose_transforms.py and face_swapping.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
YuvalNirkin committed Oct 3, 2020
1 parent 555a263 commit 6b51e3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion datasets/img_lms_pose_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def __call__(self, x):
numpy.ndarray or list of numpy.ndarray: Transformed images or poses
"""
if isinstance(x, (list, tuple)):
if len(x) == 2 and is_img(x) and is_bbox(x):
if len(x) == 2 and is_img(x[0]) and is_bbox(x[1]):
# Found image and bounding box pair
img, bbox = x
if self.det_format:
Expand Down
13 changes: 2 additions & 11 deletions inference/face_swapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU",
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"source": [],
"metadata": {
"collapsed": false
}
}
}
"accelerator": "GPU"
},
"cells": [
{
Expand Down Expand Up @@ -99,7 +90,7 @@
"\n",
"!conda install pytorch torchvision cudatoolkit=10.1 -c pytorch -y\n",
"!conda install -c conda-forge yacs -y\n",
"!pip install opencv-python ffmpeg-python youtube-dl\n",
"!pip3 install opencv-python ffmpeg-python youtube-dl\n",
"\n",
"!mkdir -p /content/projects/\n",
"%cd /content/projects/\n",
Expand Down

0 comments on commit 6b51e3c

Please sign in to comment.