In the name of God
This gist contains steps to setup Ubuntu 22.04 for deep learning.
| from __future__ import absolute_import | |
| from __future__ import division | |
| from __future__ import print_function | |
| import argparse | |
| import io | |
| import os | |
| import time | |
| import random | |
| import numpy as np |
| import numpy as np | |
| from PIL import Image | |
| import cv2 | |
| from src.keras_utils import reconstruct | |
| import pycuda.driver as cuda | |
| import pycuda.autoinit # For automatic creation and cleanup of CUDA context | |
| import tensorrt as trt | |
| import utils |
| # -------------------------------------------------------- | |
| # Camera sample code for Tegra X2/X1 | |
| # | |
| # This program could capture and display video from | |
| # IP CAM, USB webcam, or the Tegra onboard camera. | |
| # Refer to the following blog post for how to set up | |
| # and run the code: | |
| # https://jkjung-avt.github.io/tx2-camera-with-python/ | |
| # | |
| # Written by JK Jung <[email protected]> |
| from __future__ import print_function | |
| import requests | |
| import json | |
| import cv2 | |
| addr = 'http://localhost:5000' | |
| test_url = addr + '/api/test' | |
| # prepare headers for http request | |
| content_type = 'image/jpeg' |