This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import argparse | |
import cv2 as cv | |
# import json | |
import numpy as np | |
import os | |
# import tensorflow as tf | |
import time | |
import uuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConsumerRecord(topic='ai-integrator-video', partition=0, offset=127, timestamp=1631076816929, timestamp_type=0, key=b'17812', value=b'{"request_id": 17812, "request_type": "video_url", "log_id": 15093, "category_id": 1, "object_id": 1, "field_name": "VideoUrl", "field_value": "https://fbang-web-assets.s3.ap-southeast-1.amazonaws.com/common/ELDEN+RING+-+Official+Gameplay+Reveal.mp4"}', checksum=None, serialized_key_size=5, serialized_value_size=251, headers=()) | |
ConsumerRecord(topic='ai-integrator-video', partition=0, offset=128, timestamp=1631076816955, timestamp_type=0, key=b'17821', value=b'{"request_id": 17821, "request_type": "video_url", "log_id": 15096, "category_id": 1, "object_id": 1, "field_name": "VideoUrl", "field_value": "https://fbang-web-assets.s3.ap-southeast-1.amazonaws.com/common/ELDEN+RING+-+Official+Gameplay+Reveal.mp4"}', checksum=None, serialized_key_size=5, serialized_value_size=251, headers=()) | |
ConsumerRecord(topic='ai-integrator-video', partition=0, offset=129, timestamp=1631076817013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
} | |
step { | |
model_name: "yolov5_onnx_horror_postprocess" | |
model_version: 1 | |
input_map { | |
key: "FLAG_INFERENCE" | |
value: "FLAG_OUTPUT" | |
} | |
input_map { | |
key: "HORROR_INFERENCE_0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I0809 10:27:23.454255 1 logging.cc:52] Tactic: 861694390046228376 time 0.401024 | |
I0809 10:27:23.457287 1 logging.cc:52] Conv_105 + Relu_106 (scudnn) Set Tactic Name: volta_scudnn_128x64_sliced1x2_ldg4_relu_exp_small_nhwc_tn_v1 | |
I0809 10:27:23.468172 1 logging.cc:52] Tactic: 5258189349241541167 time 0.214656 | |
I0809 10:27:23.468615 1 logging.cc:52] Conv_105 + Relu_106 (scudnn) Set Tactic Name: volta_scudnn_128x128_relu_exp_small_nhwc_tn_v1 | |
I0809 10:27:23.479728 1 logging.cc:52] Tactic: 5821621277990374316 time 0.399456 | |
I0809 10:27:23.480157 1 logging.cc:52] Conv_105 + Relu_106 (scudnn) Set Tactic Name: volta_scudnn_128x32_sliced1x4_ldg4_relu_exp_small_nhwc_tn_v1 | |
I0809 10:27:23.490417 1 logging.cc:52] Tactic: 5863767799113001648 time 0.117984 | |
I0809 10:27:23.490856 1 logging.cc:52] Conv_105 + Relu_106 (scudnn) Set Tactic Name: volta_scudnn_128x128_ldg4_relu_exp_medium_nhwc_tn_v1 | |
I0809 10:27:23.501746 1 logging.cc:52] Tactic: -9147980667639709536 time 0.399328 | |
I0809 10:27:23.502250 1 logging.cc:52] Conv_105 + Relu_10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
import asyncio | |
import time | |
import requests | |
from PIL import Image | |
import io | |
start_time = time.time() | |
urls = [ | |
"https://kscloset.vn/wp-content/uploads/2021/03/K154TES-FK1AADOOK116TES-FK5A0CAM1--270x370.jpg", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI, File, UploadFile, HTTPException | |
from PIL import Image | |
from pydantic import BaseModel | |
from tensorflow.keras.models import load_model | |
from typing import List | |
import io | |
import numpy as np | |
import sys | |
import uvicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Script to eveluation model | |
Usage: | |
python evaluate.py --dataset /path/to/folder/images --checkpoint /point/to/model | |
Example: | |
python evaluate.py --dataset /dataset/val --checkpoint /box20190222T1237/mask_rcnn_box_0019.h5 | |
""" | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nowadays, using the stare-of-art algorithm, it is possible to create a system that helps people in- | |
crease the performance of work, avoid spending too much time on mundane tasks so they can | |
concentrate on work that requires human skills. Deep learning methods can complete tasks that | |
previously took human a lot of time to do. | |
Fresh food in supermarkets such as fruit, vegetables are sold quickly that why employ- | |
ees should re-fill the empty boxes with fresh fruit, vegetables as soon as possible. In the current | |
workflows, employees need to check manually and it is very time-consuming. | |
The goal of the thesis is to demonstrate that computer vision and deep learning can solve the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Save numpy data to tfrecord | |
import numpy as np | |
import tensorflow as tf | |
#Generate Test data | |
# a float array and int array each with shape (2,2,2) | |
f_array = np.array([[[1., 2.], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# I hate the documentation of openpyxl and it took me a while to undertand their stuff. So I decided to write down this code. | |
# Has some wrapper functions that reads all rows from the excel sheet and also a function to read a particular row. | |
# Add some code to the functions if you wish to do something on fly like adding values to list and sorting them later. | |
# | |
# Date: 28/09/2015 | |
from openpyxl import load_workbook | |
# Reads all rows |
NewerOlder