Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Siamese model code #5

Merged
merged 35 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bca8a3f
model update to original dims
emwangs Nov 5, 2023
f4efca8
merge from main
emwangs Nov 5, 2023
5c0b034
New working Siamese network
emwangs Nov 19, 2023
7a40269
Merge
emwangs Nov 19, 2023
110731b
siamese network model saver + python file
emwangs Nov 27, 2023
ddef4e9
Integrate motion detection with capture loop
chrisfxu Nov 28, 2023
19ccdf4
Update README.md
chrisfxu Nov 28, 2023
94ab1fc
Update README.md
chrisfxu Nov 28, 2023
36c9d0c
Modify simple_camera for nano
srishagaur Nov 29, 2023
841b16c
Siamese models with cleaned up files
emwangs Nov 30, 2023
e42640b
Switched to use image absolute path
srishagaur Dec 1, 2023
9c6d7bd
Merge branch 'main' into siamese-model
emwangs Dec 1, 2023
4dbed8e
merge conflicts
ryanisho Dec 1, 2023
80b7c39
Linter issues
ryanisho Dec 1, 2023
3612015
linter issues v2
ryanisho Dec 1, 2023
b609d12
linter issues v3
ryanisho Dec 1, 2023
70030e8
removed unused directories
ryanisho Dec 1, 2023
9e1fbee
removed unused utils
ryanisho Dec 1, 2023
2571ead
Change predictor file arg name
srishagaur Dec 1, 2023
49ea0cf
merge
lisarli Dec 1, 2023
afbf6bf
didn't fix anything
srishagaur Dec 1, 2023
6c9b171
fix :)
srishagaur Dec 1, 2023
c011dba
test cmake stuff
srishagaur Dec 1, 2023
00b318e
where did temp_main go???
ryanisho Dec 1, 2023
08f40ab
Merge remote-tracking branch 'origin/fixed-cpp-final' into siamese-model
lisarli Dec 1, 2023
ce58beb
Move xml file and delete bad cmake files
srishagaur Dec 1, 2023
5c5831c
Simple camera writes to file and triggers prediction
srishagaur Dec 1, 2023
6bd431f
Fixed paths to be absolute so bounding boxes work
srishagaur Dec 1, 2023
0a0a716
Threaded model similarity score calculation
srishagaur Dec 2, 2023
3429f79
Threaded model similarity score calculation
srishagaur Dec 2, 2023
ae95f6f
Merge branch 'siamese-model' of github.com:CornellDataScience/edge-ml…
srishagaur Dec 2, 2023
fa84d1a
Try to pass the linter
lisarli Dec 2, 2023
3cbd5ef
Merge branch 'siamese-model' of github.com:CornellDataScience/edge-ml…
srishagaur Dec 2, 2023
97e65c8
Remove cmake files
srishagaur Dec 2, 2023
74747b6
Remove more cmake files
srishagaur Dec 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ src/model/train/**
src/model/test/**
src/model/david/**
venv/**
src/model/keras/**
src/model/*.h5
build/**
Images/**
*.DS_Store
.vscode/
**/CMakeFiles/**
**/cmake_install.cmake
**/CMakeCache.txt
camera
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.12)
project(edge-ml)

find_package(OpenCV REQUIRED)

# Add subdirectories
add_subdirectory(src)
add_subdirectory(utils)

# Define your executable and link libraries if needed
add_executable(camera src/simple_camera.cpp)

include_directories(${OpenCV_INCLUDE_DIRS})

target_link_libraries(camera PRIVATE ${OpenCV_LIBS} UtilityLib)
192 changes: 192 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.13

# Default target executed when no arguments are given to make.
default_target: all

.PHONY : default_target

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:


#=============================================================================
# Special targets provided by cmake.

# Disable implicit rules so canonical targets will work.
.SUFFIXES:


# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =

.SUFFIXES: .hpux_make_needs_suffix_list


# Suppress display of executed commands.
$(VERBOSE).SILENT:


# A target that is always out of date.
cmake_force:

.PHONY : cmake_force

#=============================================================================
# Set environment variables for the build.

# The shell in which to execute make rules.
SHELL = /bin/sh

# The CMake executable.
CMAKE_COMMAND = /usr/local/bin/cmake

# The command to remove a file.
RM = /usr/local/bin/cmake -E remove -f

# Escaping for special characters.
EQUALS = =

# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/cds-nano-3/edge-ml

# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/cds-nano-3/edge-ml

#=============================================================================
# Targets provided globally by CMake.

# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/local/bin/cmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache

# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache

.PHONY : rebuild_cache/fast

# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/local/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache

# Special rule for the target edit_cache
edit_cache/fast: edit_cache

.PHONY : edit_cache/fast

# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/cds-nano-3/edge-ml/CMakeFiles /home/cds-nano-3/edge-ml/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/cds-nano-3/edge-ml/CMakeFiles 0
.PHONY : all

# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean

# The main clean target
clean/fast: clean

.PHONY : clean/fast

# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall

# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast

# clear depends
depend:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend

#=============================================================================
# Target rules for targets named camera

# Build rule for target.
camera: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 camera
.PHONY : camera

# fast build rule for target.
camera/fast:
$(MAKE) -f CMakeFiles/camera.dir/build.make CMakeFiles/camera.dir/build
.PHONY : camera/fast

#=============================================================================
# Target rules for targets named UtilityLib

# Build rule for target.
UtilityLib: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 UtilityLib
.PHONY : UtilityLib

# fast build rule for target.
UtilityLib/fast:
$(MAKE) -f utils/CMakeFiles/UtilityLib.dir/build.make utils/CMakeFiles/UtilityLib.dir/build
.PHONY : UtilityLib/fast

src/simple_camera.o: src/simple_camera.cpp.o

.PHONY : src/simple_camera.o

# target to build an object file
src/simple_camera.cpp.o:
$(MAKE) -f CMakeFiles/camera.dir/build.make CMakeFiles/camera.dir/src/simple_camera.cpp.o
.PHONY : src/simple_camera.cpp.o

src/simple_camera.i: src/simple_camera.cpp.i

.PHONY : src/simple_camera.i

# target to preprocess a source file
src/simple_camera.cpp.i:
$(MAKE) -f CMakeFiles/camera.dir/build.make CMakeFiles/camera.dir/src/simple_camera.cpp.i
.PHONY : src/simple_camera.cpp.i

src/simple_camera.s: src/simple_camera.cpp.s

.PHONY : src/simple_camera.s

# target to generate assembly for a file
src/simple_camera.cpp.s:
$(MAKE) -f CMakeFiles/camera.dir/build.make CMakeFiles/camera.dir/src/simple_camera.cpp.s
.PHONY : src/simple_camera.cpp.s

# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... rebuild_cache"
@echo "... camera"
@echo "... edit_cache"
@echo "... UtilityLib"
@echo "... src/simple_camera.o"
@echo "... src/simple_camera.i"
@echo "... src/simple_camera.s"
.PHONY : help



#=============================================================================
# Special targets to cleanup operation of make.

# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@
Make sure git-clang-format is installed with `npm install -g clang-format`
1. Call `clang-format.sh` under ci/
2. `git add` and `git commit`!
To run:

`cd build`

`cmake ..`

`make`

`./camera`
Binary file added camera
Binary file not shown.
44 changes: 41 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@

absl-py==2.0.0
astunparse==1.6.3
cachetools==5.3.2
certifi==2023.7.22
charset-normalizer==3.3.2
flatbuffers==23.5.26
gast==0.4.0
google-auth==2.23.4
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
grpcio==1.59.2
h5py==3.10.0
idna==3.4
jax==0.4.20
keras==2.12.0
Pillow==10.0.1
tensorflow-macos==2.12.0
libclang==16.0.6
Markdown==3.5.1
MarkupSafe==2.1.3
ml-dtypes==0.3.1
numpy==1.23.5
oauthlib==3.2.2
opencv-python==4.8.1.78
opt-einsum==3.3.0
packaging==23.2
protobuf==4.25.0
pyasn1==0.5.0
pyasn1-modules==0.3.0
requests==2.31.0
requests-oauthlib==1.3.1
rsa==4.9
scipy==1.11.3
six==1.16.0
tensorboard==2.12.3
tensorboard-data-server==0.7.2
tensorflow-estimator==2.12.0
tensorflow-io-gcs-filesystem==0.34.0
tensorflow-macos==2.12.0
termcolor==2.3.0
typing_extensions==4.8.0
urllib3==2.0.7
Werkzeug==3.0.1
wrapt==1.14.1
8 changes: 0 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
cmake_minimum_required(VERSION 3.12)
project(OpenCVExample)

find_package(OpenCV REQUIRED)

add_executable(simple_camera simple_camera.cpp)

target_link_libraries(simple_camera PRIVATE ${OpenCV_LIBS})
Loading