replaced strings with variables
Esse commit está contido em:
+14
-25
@@ -461,7 +461,7 @@
|
||||
"if (haarcascade in os.listdir(os.curdir)):\n",
|
||||
" print(\"File exists\")\n",
|
||||
"else:\n",
|
||||
" # download file from url and save locally as haarcascade_frontalface_alt2.xml\n",
|
||||
" # download file from url and save locally as haarcascade_frontalface_alt2.xml, < 1MB\n",
|
||||
" urlreq.urlretrieve(haarcascade_url, haarcascade)\n",
|
||||
" print(\"File downloaded\")"
|
||||
]
|
||||
@@ -491,7 +491,7 @@
|
||||
],
|
||||
"source": [
|
||||
"# create an instance of the Face Detection Cascade Classifier\n",
|
||||
"detector = cv2.CascadeClassifier(\"haarcascade_frontalface_alt2.xml\")\n",
|
||||
"detector = cv2.CascadeClassifier(haarcascade)\n",
|
||||
"\n",
|
||||
"# Detect faces using the haarcascade classifier on the \"grayscale image\"\n",
|
||||
"faces = detector.detectMultiScale(image_gray)\n",
|
||||
@@ -589,7 +589,7 @@
|
||||
"if (LBFmodel in os.listdir(os.curdir)):\n",
|
||||
" print(\"File exists\")\n",
|
||||
"else:\n",
|
||||
" # download picture from url and save locally as lbfmodel.yaml\n",
|
||||
" # download picture from url and save locally as lbfmodel.yaml, < 54MB\n",
|
||||
" urlreq.urlretrieve(LBFmodel_url, LBFmodel)\n",
|
||||
" print(\"File downloaded\")"
|
||||
]
|
||||
@@ -819,13 +819,13 @@
|
||||
"source": [
|
||||
"# create an instance of the Facial landmark Detector with the model\n",
|
||||
"landmark_detector = cv2.face.createFacemarkLBF()\n",
|
||||
"landmark_detector.loadModel(\"lbfmodel.yaml\")\n",
|
||||
"landmark_detector.loadModel(LBFmodel)\n",
|
||||
"\n",
|
||||
"# Detect landmarks on \"image_gray\"\n",
|
||||
"_, landmarks = landmark_detector.fit(image_gray, faces)\n",
|
||||
"\n",
|
||||
"# print coordinates of detected landmarks\n",
|
||||
"print(\"landmarks LBF\\n\", landmarks)"
|
||||
"print(\"Landmarks\\n\", landmarks)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1004,29 +1004,18 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"https://github.com/kurnianggoro/GSOC2017"
|
||||
"https://github.com/albertofernandezvillan\n",
|
||||
"<br>https://github.com/kurnianggoro/GSOC2017\n",
|
||||
"<br>https://github.com/sacchitchadha\n",
|
||||
"<br>https://github.com/tensorflowlagos"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"https://github.com/sacchitchadha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"https://github.com/albertofernandezvillan"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"https://github.com/tensorflowlagos"
|
||||
]
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
@@ -1056,4 +1045,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
}
|
||||
Referência em uma Nova Issue
Bloquear um usuário