Skip to content

Instantly share code, notes, and snippets.

View tamnguyenvan's full-sized avatar

Tam Nguyen tamnguyenvan

  • Ha Noi Viet Nam
View GitHub Profile
@tamnguyenvan
tamnguyenvan / detect_with_tiling.py
Last active August 30, 2021 01:32
detect with tiling
import argparse
import os
import platform
import shutil
import time
from pathlib import Path
import math
import cv2
import torch
@tamnguyenvan
tamnguyenvan / slice_assignment.py
Created April 20, 2020 02:59
Tensorflow slice assignment.
import tensorflow as tf
# tf.enable_eager_execution() # uncomment if tf version < 2.0
def assign(x, slices, values):
"""Assign slicing-tensor to the given values.
Args
:x: A `Tensor` as input.
:slices: A `Tensor`, `list` or `numpy array` indicates the region