|
88 | 88 | "name": "stdout",
|
89 | 89 | "output_type": "stream",
|
90 | 90 | "text": [
|
91 |
| - "<Response [200]>\n", |
92 |
| - "CPU times: user 7.06 ms, sys: 3.84 ms, total: 10.9 ms\n", |
93 |
| - "Wall time: 367 ms\n" |
| 91 | + "CPU times: user 8.26 ms, sys: 4.79 ms, total: 13 ms\n", |
| 92 | + "Wall time: 701 ms\n" |
94 | 93 | ]
|
95 | 94 | }
|
96 | 95 | ],
|
|
299 | 298 | "## Custom model\n",
|
300 | 299 | "I have mounted a custom model, run with:\n",
|
301 | 300 | "```\n",
|
302 |
| - "docker run -v /Users/robin/Data/pytorch-models:/modelstore/detection -p 80:5000 deepquestai/deepstack:cpu-x6-beta\n", |
| 301 | + "docker run -v /Users/robin/Data/pytorch-models:/modelstore/detection -p 80:5000 deepquestai/deepstack:latest\n", |
303 | 302 | "```"
|
304 | 303 | ]
|
305 | 304 | },
|
|
320 | 319 | {
|
321 | 320 | "data": {
|
322 | 321 | "text/plain": [
|
323 |
| - "<deepstack.core.DeepstackObject at 0x7fca7b874c50>" |
| 322 | + "<deepstack.core.DeepstackObject at 0x7fd5060369e8>" |
324 | 323 | ]
|
325 | 324 | },
|
326 | 325 | "execution_count": 13,
|
|
358 | 357 | },
|
359 | 358 | {
|
360 | 359 | "cell_type": "code",
|
361 |
| - "execution_count": 15, |
| 360 | + "execution_count": 17, |
362 | 361 | "metadata": {},
|
363 | 362 | "outputs": [
|
364 | 363 | {
|
365 | 364 | "name": "stdout",
|
366 | 365 | "output_type": "stream",
|
367 | 366 | "text": [
|
368 |
| - "<Response [404]>\n", |
369 |
| - "Error from request, status code: 404\n", |
370 |
| - "CPU times: user 4.66 ms, sys: 2.03 ms, total: 6.69 ms\n", |
371 |
| - "Wall time: 22.5 ms\n" |
| 367 | + "CPU times: user 5 ms, sys: 2.83 ms, total: 7.83 ms\n", |
| 368 | + "Wall time: 548 ms\n" |
372 | 369 | ]
|
373 | 370 | }
|
374 | 371 | ],
|
|
383 | 380 | },
|
384 | 381 | {
|
385 | 382 | "cell_type": "code",
|
386 |
| - "execution_count": 16, |
387 |
| - "metadata": {}, |
388 |
| - "outputs": [ |
389 |
| - { |
390 |
| - "ename": "TypeError", |
391 |
| - "evalue": "'NoneType' object is not subscriptable", |
392 |
| - "output_type": "error", |
393 |
| - "traceback": [ |
394 |
| - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", |
395 |
| - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", |
396 |
| - "\u001b[0;32m<ipython-input-16-9840dd4da3cd>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmask_model\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpredictions\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", |
397 |
| - "\u001b[0;32m~/Github/deepstack-python/deepstack/core.py\u001b[0m in \u001b[0;36mpredictions\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 153\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mpredictions\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 154\u001b[0m \u001b[0;34m\"\"\"Return the predictions.\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 155\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_response\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"predictions\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 156\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 157\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", |
398 |
| - "\u001b[0;31mTypeError\u001b[0m: 'NoneType' object is not subscriptable" |
399 |
| - ] |
400 |
| - } |
401 |
| - ], |
402 |
| - "source": [ |
403 |
| - "mask_model.predictions" |
404 |
| - ] |
405 |
| - }, |
406 |
| - { |
407 |
| - "cell_type": "code", |
408 |
| - "execution_count": null, |
409 |
| - "metadata": {}, |
410 |
| - "outputs": [], |
411 |
| - "source": [ |
412 |
| - "mask_model._response" |
413 |
| - ] |
414 |
| - }, |
415 |
| - { |
416 |
| - "cell_type": "code", |
417 |
| - "execution_count": 17, |
| 383 | + "execution_count": 18, |
418 | 384 | "metadata": {},
|
419 | 385 | "outputs": [
|
420 | 386 | {
|
421 | 387 | "data": {
|
422 | 388 | "text/plain": [
|
423 |
| - "'http://localhost:80/v1/vision/custom/mask'" |
| 389 | + "[{'confidence': 0.94608647,\n", |
| 390 | + " 'label': 'mask',\n", |
| 391 | + " 'y_min': 111,\n", |
| 392 | + " 'x_min': 248,\n", |
| 393 | + " 'y_max': 177,\n", |
| 394 | + " 'x_max': 332}]" |
424 | 395 | ]
|
425 | 396 | },
|
426 |
| - "execution_count": 17, |
| 397 | + "execution_count": 18, |
427 | 398 | "metadata": {},
|
428 | 399 | "output_type": "execute_result"
|
429 | 400 | }
|
430 | 401 | ],
|
431 | 402 | "source": [
|
432 |
| - "mask_model._url_detect" |
| 403 | + "mask_model.predictions" |
433 | 404 | ]
|
434 | 405 | },
|
435 | 406 | {
|
|
0 commit comments