Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Wow! so much learning

Sergio Bugallo sbugallo

🤖
Wow! so much learning
View GitHub Profile
@sbugallo
sbugallo / CMakeLists.txt
Created Jun 16, 2021
ONNX runtime batch inference C++ API
View CMakeLists.txt
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 Jan 23, 2018
VGG16 for MRCNN
View vgg-16.py
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 Jan 23, 2018
ResNeXt 101 for MRCNN
View resnext-101.py
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 Jan 23, 2018
Inception V3 for MRCNN
View inception-v3.py
# -*- 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 Jan 23, 2018
Inception ResNet V2 for MRCNN
View inception-resnet-v2.py
# -*- 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