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

mutliple security fixes, disabled classification, improved label presentation #103

Merged
merged 102 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
56614d6
Coco POC #8 #9 (#19) (#26)
Mar 12, 2022
3d6829f
removed symlink
Mar 12, 2022
5638685
Merge branch 'aws/trashai-staging' into testing_coco
Mar 12, 2022
40b16a3
Testing coco (#28)
Mar 12, 2022
aa3a62f
Changed upload behaviour
Mar 13, 2022
b3e2234
Merge branch 'aws/trashai-staging' of github.com:code4sac/trash-ai in…
Mar 13, 2022
e5b4f88
Merge branch 'production' into aws/trashai-staging
Mar 13, 2022
457a5c1
Merge branch 'testing_coco' into aws/trashai-staging
Mar 13, 2022
c48befd
Refactored upload dialog / drop area
Mar 13, 2022
5d8db28
Fixed issue with remove / key and array order
Mar 13, 2022
4ed2acb
Removed lab / test for deployed versions of environment
Mar 14, 2022
e206216
Forgot to update the metadata text
Mar 14, 2022
550014e
Yolov5-Taco web model #7 (#30)
Mar 19, 2022
39800da
Testing change to model loading in AWS
Mar 21, 2022
ba36038
Try 2 on loading model
Mar 22, 2022
4f3be20
Try 3 on loading model
Mar 22, 2022
92ae160
Reverting changes (has to do with basic auth url)
Mar 22, 2022
b610d17
Removed old react frontend directory
Mar 30, 2022
50b9714
Removed old react frontend directory (#34)
Mar 31, 2022
877793a
Merge branch 'aws/trashai-staging' of github.com:code4sac/trash-ai in…
Mar 31, 2022
401c426
Moving domain from codefordev to trashai.org
Mar 31, 2022
01e9e7a
Merge branch 'production' into aws/trashai-staging
Apr 6, 2022
9413057
Replaced Backend with python, fixed infa deploy logic # 35
Apr 6, 2022
890d02c
Addresses # 32, added new features amongst them a download all button
Apr 6, 2022
cee6178
Added support for python packages
Apr 6, 2022
b49bd19
Adjusted permission to add/remove layers in the prefix namespace
Apr 7, 2022
56545f8
fixed permissions issue for layers / backend deploy
Apr 7, 2022
58068e2
Added hash and other metadata to the metadata display and hover over …
Apr 7, 2022
45685e4
Fixed metadata download and info button
Apr 7, 2022
2dfc14b
Fixes for #36, #35, #32 + download all feature, and backend refactor …
Apr 7, 2022
ecb7dfa
Fixing file ext name issue with s3 bucket upload on backend
Apr 7, 2022
2c6d994
bugfix on s3 naming with file extension (#40)
Apr 7, 2022
eeb8d72
Merge branch 'production' of github.com:code4sac/trash-ai into aws/tr…
feydan Apr 7, 2022
66fe713
Added magnifying feature for larger images
Apr 14, 2022
a8a5aba
filling out the about page (#45)
feydan Apr 14, 2022
400b3e8
Merge branch 'production' into aws/shollingsworth-root
Apr 14, 2022
18e696c
Made about page default #49
Apr 27, 2022
127d414
Added "Samples" button to upload tab closes #50
Apr 30, 2022
c9e4cb0
Making about updates specified in #48 (#51)
feydan May 4, 2022
5960018
small about update
feydan May 5, 2022
a3352fb
merging production into branch
feydan May 5, 2022
8bfc643
Demoing the CI/CD integration
May 25, 2022
bc9e947
Typescript refactor Version 1
Jul 23, 2022
7a4dacc
Merge branch 'typescript_refactor' into aws/trashai-staging
Jul 23, 2022
4d88705
removed nuxt
Jul 23, 2022
586e818
removed more files
Jul 23, 2022
8dea7eb
adjusted build commands
Jul 23, 2022
45c82da
fixed height issue with uploads
Jul 23, 2022
92e8dd1
re-implemented backend
Jul 23, 2022
002aa03
adjusted frontend deploy stack
Jul 23, 2022
951252d
Merge branch 'typescript_refactor' into aws/shollingsworth-root
Jul 23, 2022
e6ceebd
Added github secret for google maps api key
Jul 23, 2022
3f69bd5
Added dockerfile for frontend
Jul 23, 2022
53da16f
added jszip
Jul 23, 2022
d34b76e
Fixed android upload gps issue, fixed mobile status truncating issue
Jul 24, 2022
8607374
removed uneeded logo files
Jul 24, 2022
25ab380
Typescript refactor (#58)
Aug 4, 2022
2451212
updated deploy scripts
Aug 6, 2022
1454a9a
Merge branch 'update_deploy_scripts' into aws/trashai-staging
Aug 6, 2022
a88f586
testing config update
Aug 6, 2022
4859e4f
added vite
Aug 6, 2022
8d3f418
testing vite
Aug 6, 2022
57e7222
testing vite
Aug 6, 2022
b549c19
testing deploy
Aug 6, 2022
3812a8a
adjusted permissions to allow access to public bucket
Aug 6, 2022
77c137d
still testing
Aug 6, 2022
cb014ff
arg!
Aug 6, 2022
64bc14b
Updating about page (#64)
feydan Aug 18, 2022
30b0058
Merge remote-tracking branch 'upstream/production' into aws/trashai-s…
Aug 18, 2022
d343311
adding google analytics script (#67)
feydan Aug 27, 2022
fc492f4
removing kaggle depedency on running model notebook (#82)
feydan Oct 13, 2022
ed5620b
Updated UI to prepare to allow classifications (#63)
Nov 3, 2022
420ddbc
added missing rxjs package
Nov 3, 2022
6edee5e
Merge branch 'production' into aws/trashai-staging
Nov 3, 2022
aa7a97b
bugfix on deploy script (testing)
Nov 3, 2022
fee98c0
Add files to run notebook on MacBook M1 machine (#81)
gdurante2019 Nov 5, 2022
a6f4242
deleted about.Vue (#90)
Jan 12, 2023
a645f9c
changed docker-compose to docker compose
Jan 12, 2023
1ef0e8d
Bump moment-timezone from 0.5.34 to 0.5.40 in /backend
dependabot[bot] Feb 2, 2023
c61de3e
Bump simple-git from 3.5.0 to 3.16.0 in /backend (#95)
dependabot[bot] Feb 2, 2023
b5a6bd9
Bump http-cache-semantics from 4.1.0 to 4.1.1 in /infra
dependabot[bot] Feb 2, 2023
5f7c5c5
Bump cookiejar from 2.1.3 to 2.1.4 in /infra
dependabot[bot] Feb 2, 2023
1079317
Bump json5 from 2.2.1 to 2.2.3 in /infra
dependabot[bot] Feb 2, 2023
9e51638
Bump luxon from 1.28.0 to 1.28.1 in /infra
dependabot[bot] Feb 2, 2023
4bfb5cf
Merge branch 'aws/trashai-staging' into dependabot/npm_and_yarn/backe…
Feb 2, 2023
180523e
Local Deployment (#86)
Feb 4, 2023
ed90d65
Manuscript (#69)
Feb 4, 2023
c974a76
Bump moment-timezone from 0.5.34 to 0.5.40 in /backend
dependabot[bot] Feb 2, 2023
e5e5ec7
Bump luxon from 1.28.0 to 1.28.1 in /backend (#94)
dependabot[bot] Feb 2, 2023
6dc8d74
Bump cookiejar from 2.1.3 to 2.1.4 in /infra
dependabot[bot] Feb 2, 2023
b2f6347
Bump http-cache-semantics from 4.1.0 to 4.1.1 in /infra
dependabot[bot] Feb 2, 2023
1de076c
Bump json5 from 2.2.1 to 2.2.3 in /infra
dependabot[bot] Feb 2, 2023
a65f4ec
Bump luxon from 1.28.0 to 1.28.1 in /infra
dependabot[bot] Feb 2, 2023
5374b07
Merge remote-tracking branch 'upstream/dependabot/npm_and_yarn/infra/…
Feb 4, 2023
32a41ed
Merge remote-tracking branch 'upstream/dependabot/npm_and_yarn/backen…
Feb 4, 2023
ef0043f
Merge remote-tracking branch 'upstream/dependabot/npm_and_yarn/infra/…
Feb 4, 2023
e024d96
Merge remote-tracking branch 'upstream/dependabot/npm_and_yarn/infra/…
Feb 4, 2023
5e0fc99
Merge remote-tracking branch 'upstream/dependabot/npm_and_yarn/infra/…
Feb 4, 2023
29501e4
disabled draw actions per issue 89 (#102)
shollingsworth Feb 4, 2023
78cff9a
reset yarn.lock
Feb 4, 2023
0bd7334
Cosmetic adjustments to image view screen
Mar 2, 2023
ef90b69
Removed uneeded files, added troubleshooting section
Mar 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ tmp/
.Rproj.user
delete.bat
.Rhistory
model/build/Mask*
model/build/taco*
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/trash-ai.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source $HOME/.config/nvm/nvm.sh
nvm use 16.14.0
nvm use 16
export B=$(dirname $0)
export O=$B/frontend.orig
export S=$B/frontend/src
Expand Down
22 changes: 11 additions & 11 deletions backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ dayjs@^1.11.0:
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.0.tgz#009bf7ef2e2ea2d5db2e6583d2d39a4b5061e805"
integrity sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug==

debug@4, debug@^4.1.1, debug@^4.3.3:
debug@4, debug@^4.1.1, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
Expand Down Expand Up @@ -2665,16 +2665,16 @@ mkdirp@^1.0.3:
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==

moment-timezone@^0.5.31:
version "0.5.34"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c"
integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==
version "0.5.40"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.40.tgz#c148f5149fd91dd3e29bf481abc8830ecba16b89"
integrity sha512-tWfmNkRYmBkPJz5mr9GVDn9vRlVZOTe6yqY92rFxiOdWXbjaR0+9LwQnZGGuNR63X456NqmEkbskte8tWL5ePg==
dependencies:
moment ">= 2.9.0"

"moment@>= 2.9.0":
version "2.29.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==

ms@2.1.2:
version "2.1.2"
Expand Down Expand Up @@ -3569,13 +3569,13 @@ signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==

simple-git@^3.4.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.5.0.tgz#3c3538f4d7a1b3c8f3904412b12740bdcad9c8b1"
integrity sha512-fZsaq5nzdxQRhMNs6ESGLpMUHoL5GRP+boWPhq9pMYMKwOGZV2jHOxi8AbFFA2Y/6u4kR99HoULizSbpzaODkA==
version "3.16.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.16.0.tgz#421773e24680f5716999cc4a1d60127b4b6a9dec"
integrity sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==
dependencies:
"@kwsites/file-exists" "^1.1.1"
"@kwsites/promise-deferred" "^1.1.1"
debug "^4.3.3"
debug "^4.3.4"

slash@^3.0.0:
version "3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions bin/github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def amplify_deploy(self):
raise SystemExit(f"Unknown branch: {self.branch}")
response = amplifycli.start_deployment(
appId=appid,
branchName=self.stage,
branchName=self.branch.replace("aws/", ""),
sourceUrl=f"s3://{self.public_bucket}/deploy.zip",
)

Expand Down Expand Up @@ -351,7 +351,7 @@ def frontend_stack(self):
),
Cmd(
"frontend_stack",
working_dir=self.BASE.joinpath("frontend"),
working_dir=FRONTEND,
cmd="yarn vite build",
callback=self.amplify_deploy,
),
Expand Down
3 changes: 3 additions & 0 deletions docs/localdev.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Pushing / merging PR's to any branches with a prefix of `aws/` will trigger depl
For full functionality you will want to get a Google Maps API key and name it VITE_GOOGLE_MAPS_API_KEY, but it is not required
=======

Pushing / merging PR's to any branches with a prefix of `aws/` will
trigger deployment actions, when developing locally, create a new branch
and submit a pull request to `aws/trashai-staging`

---
# Set up
Expand Down
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
.log
18 changes: 18 additions & 0 deletions frontend/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md
https://indiantechwarrior.com/tutorial-on-tensorflow-image-segmentation/
https://tfhub.dev/tensorflow/collections/lite/task-library/image-segmenter/1
https://www.tensorflow.org/lite/inference_with_metadata/task_library/image_segmenter
https://www.tensorflow.org/lite/examples/segmentation/overview
https://github.com/tensorflow/datasets
https://github.com/tensorflow/tfjs-models
https://datasetsearch.research.google.com/
https://research.google/tools/datasets/
https://www.tensorflow.org/resources/models-datasets
https://github.com/aegorfk/TensorFlow.js-for-any-model/blob/master/src/custom-model/index.js
https://cloud.google.com/vision/automl/docs/tensorflow-js-tutorial#node.js


https://keras.io/examples/keras_recipes/creating_tfrecords/
https://www.kaggle.com/code/ryanholbrook/tfrecords-basics/notebook
https://medium.com/ai%C2%B3-theory-practice-business/image-dataset-with-tfrecord-files-7188b565bfc
https://towardsdatascience.com/create-tfrecords-dataset-and-use-it-to-train-an-ml-model-da26fe9f0c2c
6 changes: 4 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
"crypto-js": "^4.1.1",
"dexie": "^3.2.2",
"file-saver": "^2.0.5",
"fuse.js": "^6.6.2",
"jszip": "^3.10.0",
"loglevel": "^1.8.0",
"p-queue": "^7.2.0",
"pinia": "^2.0.16",
"p-queue": "^7.3.0",
"pinia": "^2.0.17",
"pinia-plugin-persistedstate": "^1.6.3",
"roboto-fontface": "^0.10.0",
"rxjs": "^7.5.7",
"ts-exif-parser": "^0.2.2",
"vite-plugin-pages": "^0.25.0",
"vite-plugin-vuetify": "^1.0.0-alpha.13",
Expand Down
28 changes: 18 additions & 10 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@dragover.prevent
>
<Snack ref="snack" />
<HighlightImage />
<v-layout>
<v-app-bar
color="primary"
Expand Down Expand Up @@ -163,8 +164,11 @@
import Snack from '@/components/snack.vue'
import { defineComponent, ref } from 'vue'
import IconCode4Sac from '@/components/icon/code4sac.vue'
import HighlightImage from '@/components/model/highlight_image.vue'
import { useTheme } from 'vuetify'
import * as m from '@/lib'
import { useAppStore, useImageStore, useCache } from '@/lib/store'
import { log } from '@/lib/logging'
import { TensorFlow } from '@/lib'

interface Data {
drawer: boolean
Expand All @@ -174,41 +178,45 @@ export default defineComponent({
name: 'App',
components: {
IconCode4Sac,
HighlightImage,
Snack,
},
setup() {
const imgstore = m.useImageStore()
const appstore = m.useAppStore()
const imgstore = useImageStore()
const appstore = useAppStore()
const cache = useCache()
const theme = useTheme()
const snackbar = ref<typeof Snack>()
return {
cache,
snackbar,
imgstore,
appstore,
theme,
}
},
created() {
m.TensorFlow.getInstance()
},
mounted() {
async mounted() {
// handle back button stuff
window.onpopstate = () => {
// @ts-ignore
this.preloader = false
}
this.theme.global.name.value = this.appstore.theme
this.imgstore.doinit()
m.log.debug('veutify', this.$vuetify)
m.log.debug('mounted', this)
m.log.debug(navigator.storage.estimate())
log.debug('veutify', this.$vuetify)
log.debug('mounted', this)
log.debug(navigator.storage.estimate())

// this.$root!.$snack = this.snackbar!.value
},
data(): Data {
return {
drawer: false,
}
},
async created() {
await TensorFlow.getInstance().load()
},
computed: {
is_mobile(): boolean {
return this.$vuetify.display.mobile
Expand Down
77 changes: 0 additions & 77 deletions frontend/src/components/about.vue

This file was deleted.

31 changes: 31 additions & 0 deletions frontend/src/components/classify_instructions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<div class="d-flex">
<div class="mx-5 section-border">
<v-icon class="mr-3"> mdi-image-edit </v-icon>
<span> <b>Edit</b> </span>
<b> Double click </b>
on a classification label
</div>
<div class="mx-5 section-border">
<v-icon class="mr-3"> mdi-new-box </v-icon>
<span> <b>New</b> </span>
Hold the <b>middle mouse button</b> to draw a new classification
</div>
<slot />
</div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
name: 'Instructions',
})
</script>
<style>
.section-border {
border: 2px solid black;
padding: 10px;
margin: 5px;
}
</style>
4 changes: 2 additions & 2 deletions frontend/src/components/copybutton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script lang="ts">
import { defineComponent } from 'vue'
import useClipboard from 'vue-clipboard3'
import * as m from '@/lib'
import { log } from '@/lib/logging'
export default defineComponent({
name: 'CopyButton',
props: {
Expand All @@ -34,7 +34,7 @@ export default defineComponent({
icon: 'mdi-check',
timer: 3000,
})
m.log.debug('copied', this.text)
log.debug('copied', this.text)
},
},
})
Expand Down
Loading