Commit Graph

183 Commits

Author SHA1 Message Date
09c38abe0b Updated setup and run scripts for Mac
Didn't work running it on mac due to minor changes
and an oversight with running the autocropper container.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-08 13:46:02 -04:00
5bd770da55 First implementation of houghline cropping/deskewing
Still need to fix threshold/morphology so that the bed
picture works.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-08 13:44:43 -04:00
d5e7a2eed2 Deskew using Hough Lines
First implementation finished. Working on using it to crop.
Going to try using probabalistic hough lines and a bounding box
to pick out lines within a margin of the correct orientation (vertical)
and put a bounding box around these lines to try and approximate the
receipt.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-07 12:02:34 -04:00
f66a757d8b Start of Hough Line deskew
Exactly what the title says.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-06 22:57:18 -04:00
4500f79772 Before trying houghline technique
Just a checkpoint

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-06 08:02:16 -04:00
c921f03df2 Point before adding search selection segmentation
About to add search selection segmentation so that
I can have multiple processes since some fail to work
correctly while others do.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-04 18:24:17 -04:00
c3e9f73e73 Pushing current training loop and other helpful files
saveaspng.ipynb: Saves the dataset as individual .jpg files
	so that bad images can be more quickly seen using OS file
	previews
dataset_viewer.ipynb: Let's you iterate through the individual
	images of a dataset. A less helpful version of what saveaspng
	and OS file previews would do
image_viewer.ipynb: Nearly identical to dataset_viewer.ipynb
manualrotationchecker.ipynb: First version of a manual (non-ML)
	autorotater/deskewer
testcropper.ipynb: New version of a manual autocropper
manualcropandrotate.ipynb: Combining manual cropping and rotating
Also updated the training loop file and added a blacklist for when
making the dataset from the original dataset. Finally, the
dockerfile was updated to remove installation of some unused libraries
and added a library for the manual autorotator.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-04 02:27:12 -04:00
38b332f5c9 End of V1.1 Attempts
End of trying to train my own v1.1 custom model for autorotation.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-29 14:08:11 -04:00
d25dbf576a Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper 2023-09-26 18:02:45 -04:00
d729c50414 Updating the way I run build and run containers
Allowed it so I could have different containers for the
different branches so I could do the training for the autocropper
and also work on the app without any conflicts.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-26 18:02:26 -04:00
c724e3be78 First adjustment to try and get training to work.
Added a batch normalization layer and adjusted
the file to accomodate a restart in the training process.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-26 16:26:16 -04:00
71e712e55d State after first attempt at training
Tried training for a while with current state. Didn't show any
progress with training so I'm trying something else. Might also
just need fewer parameters but we'll see.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-26 16:12:39 -04:00
96a4abf6aa First complete implementation of ML Model
Doesn't really work well after training but work in progress.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-23 13:51:55 -04:00
61cf15e99c Initializing rotator ML algo
Pulling the rotator ML from the app branch and putting it in this one,
the correct one.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-19 12:59:57 -04:00
7426d0a90c Setting script permissions
Making the run and setup scripts executable so that when I clone
they are executable right away.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-15 21:41:48 -04:00
3ade15cf07 Updating docker for app and gpu/pytorch use
Updating docker file and run script to use expo with nodejs
and hopefully end up using react native. Also updated it for
pytorch use to run pytorch in the docker container.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-14 20:54:48 -04:00
a30c584cf3 Merge branch 'autocropper'
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-10 03:05:56 -04:00
f862cefb08 Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper 2023-09-10 02:57:29 -04:00
26bd81b15d Another gitignore update
Title. Just cleaning up.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-10 02:57:06 -04:00
6b7572a498 Clean up for PR
Cleaning up the Autocropper section to get rid of random comments
and unused files.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-10 02:55:47 -04:00
2e7adb3e03 Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper 2023-09-10 02:34:45 -04:00
a00532084b Updating gitignore
Made it so that autocropper kept it's .vscode folder.
Might change it back in the future once I try working on a different system.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-10 02:34:25 -04:00
009d6a9bac First Full Implementation Of Autocropper
Implemented the autocropper using the crop(...) function.
Also changed is to that .vscode properties get uploaded too to make
sure stuff like it should be for me (Ethan) in vscode even when on
a different system.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-10 02:32:48 -04:00
07c519723c Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper 2023-09-09 16:22:16 -04:00
fb9f3d7c06 Changing setup for use of a window/gui
Modified dockerfile so it's a little cleaner and smaller.
Also modified run and setup scripts so that they build and
run the docker containers with the stuff for windows/guis in the host system.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-09 16:21:05 -04:00
d9559a4bd0 Plan for autocropping
Tested a few things and came up with a plan for autocropping.
Plan shown in main.cpp.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-09 16:18:15 -04:00
19faf9bc63 Adding Test Image
Adding test image because it wasn't here for some reason.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 23:21:53 -04:00
bf2fa97abe Initial Autocropper Steps
First steps towards implementing the autocropper.
Current plan is to use OpenCV in C++.
There are remains of testing to use stb image manipulation
but reading them in disregarded image orientation (ie it would
rotate on it's own) which is unacceptable.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 23:15:12 -04:00
e7b447208c Updating gitignore and changing image directions
Changed directions for image manipulation from stb stuff to
using OpenCV.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 23:11:04 -04:00
7f3ca088ce Updating gitignore
As the title says. Changed it so I keep the .vscode folders.
Might need to change this later depending on if I want to keep the .vscode
folder across platforms or not.
Also removed test.cpp since it was just a test file.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 18:13:12 -04:00
30af21f540 Run script setup
Setting up a run script so that you can easily call the script to
launch the dev environment docker with the correct flags and such.
It will also remove the container once complete.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 14:52:40 -04:00
5243bc5349 Creating Setup Script
More initial setup. This time, it's creating a setup script to build the docker file

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 11:25:43 -04:00
21a933e05f Initial setup
Setting up directories and a few basic files for future use

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-09-08 02:03:04 -04:00