Skip to content

Instantly share code, notes, and snippets.

View sbugallo's full-sized avatar
🤖
Wow! so much learning

Sergio Bugallo sbugallo

🤖
Wow! so much learning
View GitHub Profile
@sbugallo
sbugallo / CMakeLists.txt
Created June 16, 2021 10:58
ONNX runtime batch inference C++ API
cmake_minimum_required(VERSION 3.17.0)
project(onnx_test)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/" ${CMAKE_MODULE_PATH})
set("OpenCV_DIR" "/usr/local/include/opencv4")
find_package(OpenCV REQUIRED)
@sbugallo
sbugallo / vgg-16.py
Created January 23, 2018 08:26
VGG16 for MRCNN
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
"""
VGG16 model
"""
def build_vgg_graph(input_image, stage5=False):
"""
@sbugallo
sbugallo / resnext-101.py
Created January 23, 2018 08:24
ResNeXt 101 for MRCNN
from keras.layers import Conv2D
from keras.layers import Activation
from keras.layers import Add
from keras.layers import BatchNormalization
from keras.layers import ZeroPadding2D
from keras.layers import MaxPooling2D
def identity_block(input_tensor, kernel_size, filters, stage, block, use_bias=True):
"""
This block is the one with no convolutional layer at its shortcut branch
@sbugallo
sbugallo / inception-v3.py
Last active January 23, 2018 08:27
Inception V3 for MRCNN
# -*- coding: utf-8 -*-
from keras import layers
from keras.layers import Activation
from keras.layers import BatchNormalization
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import AveragePooling2D
from keras import backend as K
@sbugallo
sbugallo / inception-resnet-v2.py
Created January 23, 2018 08:16
Inception ResNet V2 for MRCNN
# -*- coding: utf-8 -*-
from keras.layers import Activation
from keras.layers import AveragePooling2D
from keras.layers import BatchNormalization
from keras.layers import Concatenate
from keras.layers import Conv2D
from keras.layers import Input
from keras.layers import Lambda
from keras.layers import MaxPooling2D