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

Review1 #181

Merged
merged 79 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f79b68a
my workflow
wincowgerDEV Sep 1, 2022
dcdf30a
example templates for manuscript.
wincowgerDEV Sep 1, 2022
756f28c
manuscript info
wincowgerDEV Sep 1, 2022
d6b503b
update citations
wincowgerDEV Sep 5, 2022
6e3ff73
cleanup text
wincowgerDEV Sep 5, 2022
d249780
cite
wincowgerDEV Sep 5, 2022
e5a3fb2
update readme
wincowgerDEV Sep 5, 2022
f24c5f6
contribute
wincowgerDEV Sep 5, 2022
3122002
add website badge
wincowgerDEV Sep 5, 2022
968b751
update web link
wincowgerDEV Sep 5, 2022
bf04070
Update README.md
wincowgerDEV Sep 5, 2022
f053598
Update README.md
wincowgerDEV Sep 5, 2022
ef37cc0
add video link
wincowgerDEV Sep 5, 2022
4f46bd0
auto update
wincowgerDEV Sep 5, 2022
6050002
Merge branch 'manuscript' of https://github.com/code4sac/trash-ai int…
wincowgerDEV Sep 5, 2022
11f5eaa
utility files device specific
wincowgerDEV Sep 5, 2022
f97c3d7
move the pdf generator to workflows
wincowgerDEV Sep 5, 2022
99cde81
test error in paper.bib
wincowgerDEV Sep 5, 2022
b458d55
test citation style
wincowgerDEV Sep 5, 2022
1140afc
add citations
wincowgerDEV Sep 5, 2022
b8cbe58
add a few more citations
wincowgerDEV Sep 5, 2022
80dc434
try without space
wincowgerDEV Sep 5, 2022
acd67ec
add all
wincowgerDEV Sep 5, 2022
ce4de09
no spaces allowed in citation names
wincowgerDEV Sep 5, 2022
41dd5a1
add demo images
wincowgerDEV Sep 5, 2022
cbae5af
Update paper.md
wincowgerDEV Sep 5, 2022
d1075f3
give images some space
wincowgerDEV Sep 5, 2022
11b2c2e
image captions
wincowgerDEV Sep 5, 2022
4b2a454
add mention of wade
wincowgerDEV Sep 12, 2022
4ff318f
update authors and acknowledgements
wincowgerDEV Sep 15, 2022
c6b89e9
Updated with Dan's Recs
wincowgerDEV Sep 23, 2022
5090030
Mary Comments
wincowgerDEV Sep 28, 2022
3652a15
SteveO comments
wincowgerDEV Sep 28, 2022
39726ed
Walter's comments
wincowgerDEV Sep 28, 2022
f53d12e
Create config.yml
wincowgerDEV Sep 28, 2022
6e5361b
Create bug.yml
wincowgerDEV Sep 28, 2022
d50cb69
Create feature.yml
wincowgerDEV Sep 28, 2022
67fc98c
hyperlink
wincowgerDEV Sep 28, 2022
ac33012
Update bug.yml
wincowgerDEV Sep 28, 2022
35a35e1
Update feature.yml
wincowgerDEV Sep 28, 2022
4d30772
Added in Kristiina and Kris's comments
wincowgerDEV Oct 16, 2022
99f6145
added kristiina and kris comments
wincowgerDEV Oct 16, 2022
8c4f47d
Update README.md
wincowgerDEV Oct 26, 2022
3a33857
https://github.com/code4sac/trash-ai/pull/69#discussion_r1006489065
wincowgerDEV Oct 31, 2022
01e6bad
https://github.com/code4sac/trash-ai/pull/69#discussion_r1006514485
wincowgerDEV Oct 31, 2022
14eb61c
https://github.com/code4sac/trash-ai/pull/69#discussion_r1006517045
wincowgerDEV Oct 31, 2022
1654df8
https://github.com/code4sac/trash-ai/pull/69#discussion_r1006519572
wincowgerDEV Oct 31, 2022
0b4743e
https://github.com/code4sac/trash-ai/pull/69#discussion_r1006536610
wincowgerDEV Oct 31, 2022
21ad88f
https://github.com/code4sac/trash-ai/pull/69#discussion_r1007668618
wincowgerDEV Oct 31, 2022
83e1fd4
add kris's comments
wincowgerDEV Nov 18, 2022
29d2265
add WSL2 link
wincowgerDEV Nov 18, 2022
9633408
Update paper.md
wincowgerDEV Nov 18, 2022
327bf75
add acknowledgements
wincowgerDEV Nov 18, 2022
7a1a006
Merge branch 'production' into manuscript
wincowgerDEV Nov 24, 2022
640e465
https://github.com/code4sac/trash-ai/pull/69#discussion_r1033145379
wincowgerDEV Nov 28, 2022
3273b24
https://github.com/code4sac/trash-ai/pull/69#discussion_r1033146187
wincowgerDEV Nov 28, 2022
a582b32
https://github.com/code4sac/trash-ai/pull/69#discussion_r1024726101
wincowgerDEV Nov 28, 2022
81454c0
add submitted badge
wincowgerDEV Dec 31, 2022
52380b0
update dois
wincowgerDEV Dec 31, 2022
2527ec1
Update paper.md
wincowgerDEV May 12, 2023
c659948
Update paper.md
wincowgerDEV May 26, 2023
e46d927
Update paper.md
wincowgerDEV May 26, 2023
ed979f1
Update paper.md
wincowgerDEV Jun 4, 2023
0417b28
Update README.md
wincowgerDEV Jun 26, 2023
690e469
add r code for analyzing data
wincowgerDEV Jun 27, 2023
61f40b9
remove unnecessary code.
wincowgerDEV Jun 27, 2023
4f6e1fb
merge with production
wincowgerDEV Jun 27, 2023
c3c3a39
remove spaces
wincowgerDEV Jun 27, 2023
1bde625
trying to fix the unexpected period issue, not sure where it is comin…
wincowgerDEV Jun 27, 2023
bb1c099
revert bib to test
wincowgerDEV Jun 27, 2023
9c0863c
add dois
wincowgerDEV Jun 27, 2023
bcea1f3
Merge branch 'production' of https://github.com/code4sac/trash-ai int…
wincowgerDEV Jun 27, 2023
03b50dd
update paper acknowledgments and links.
wincowgerDEV Jun 27, 2023
4d2f090
add comments.
wincowgerDEV Jun 27, 2023
f7faa35
remove empty line
wincowgerDEV Jun 27, 2023
132b997
Update about.vue
wincowgerDEV Jun 27, 2023
ece837a
Update about.vue
wincowgerDEV Jun 27, 2023
84f1cc0
Update README.md
wincowgerDEV Jun 27, 2023
4a9caf1
Update paper.md
wincowgerDEV Jun 27, 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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Trash AI: Web application for serverless image classification of trash

[![Website](https://img.shields.io/badge/Web-TrashAI.org-blue)](https://www.trashai.org)
[![status](https://joss.theoj.org/papers/6ffbb0f89e6c928dad6908a02639789b/status.svg)](https://joss.theoj.org/papers/6ffbb0f89e6c928dad6908a02639789b)

### Project Information

Expand All @@ -14,7 +15,7 @@ Trash AI is a web application where users can upload photos of litter, which wil

#### Demo

[![image](https://user-images.githubusercontent.com/26821843/188515526-33e1196b-6830-4187-8fe4-e68b2bd4019e.png)](https://youtu.be/HHrjUpQynUM)
[![image](https://user-images.githubusercontent.com/26821843/188515526-33e1196b-6830-4187-8fe4-e68b2bd4019e.png)](https://youtu.be/u0DxGrbPOC0)

## Deployment

Expand Down Expand Up @@ -71,6 +72,9 @@ docker rm -v $id

- Runs the complex stuff so you don't have to.

### Tests
Instructions for automated and manual tests [here](https://github.com/code4sac/trash-ai/tree/production/frontend/__tests__).

## Contribute

We welcome contributions of all kinds.
Expand Down
2 changes: 1 addition & 1 deletion docs/localdev.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ These values can be adjusted by editing the localdev env file [.env](../localdev
It's suggested you work in branch `local` by creating your own local branch when developing
Pushing / merging PR's to any branches with a prefix of `aws/` will trigger deployment actions
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
9 changes: 6 additions & 3 deletions frontend/src/views/about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
To get started, visit the Upload Tab or
<a href="/uploads/0">click here</a>.
</p>
<h2>Tutorial</h2>
<p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/u0DxGrbPOC0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</p>

<h2>What is it?</h2>
<p>
Expand Down Expand Up @@ -54,9 +58,8 @@
<h2>Disclaimer about uploaded images</h2>
<p>
The current version of Trash AI and the model we are using is just a
start! When you upload an image, we are storing the image and the
classification in an effort to expand the trash dataset and improve
the model over time.
start! The tool works best for images of individual pieces of trash imaged less than 1 meter away from the camera.
We are looking for collaborators who can help us improve this project.
</p>

<h2>Reporting issues and improvements</h2>
Expand Down
50 changes: 50 additions & 0 deletions notebooks/data_reader/data_reader.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#Working directory ----
setwd("notebooks/data_reader") #Change this to your working directory

#Libraries ----
library(rio)
library(jsonlite)
library(ggplot2)
library(data.table)

# Data import ----
json_list <- import_list("example_data_download2.zip")

# Get path of the summary table.
summary_metadata <- names(json_list)[grepl("summary.json", names(json_list))]

# Get path of the image metadata.
image_metadata <- names(json_list)[!grepl("(.jpg)|(.png)|(.tif)|(schema)|(summary)", names(json_list))][-1]

# Filter the summary data.
summary_json <- json_list[[summary_metadata]]

# Flatten the summary data.
flattened_summary <- data.frame(name = summary_json$detected_objects$name,
count = summary_json$detected_objects$count)
# Filter the image data.
image_json <- json_list[image_metadata]

# Flatten the image data.
flattened_images <- lapply(1:length(image_json), function(i){
print(i)
data.frame(hash = image_json[[i]]$hash,
filename = image_json[[i]]$filename,
datetime = if(!is.null(image_json[[i]]$exifdata$DateTimeOriginal)){image_json[[i]]$exifdata$DateTimeOriginal} else{NA},
latitude = if(!is.null(image_json[[i]]$exifdata$GPSLatitude)){image_json[[i]]$exifdata$GPSLatitude} else{NA},
longitude = if(!is.null(image_json[[i]]$exifdata$GPSLongitude)){image_json[[i]]$exifdata$GPSLongitude} else{NA},
score = if(!is.null(image_json[[i]]$metadata$score)){image_json[[i]]$metadata$score} else{NA},
label = if(!is.null(image_json[[i]]$metadata$label)){image_json[[i]]$metadata$label} else{NA})
}) |>
rbindlist()

# Test equivalence in counts.
nrow(flattened_images[!is.na(flattened_images$label),]) == sum(flattened_summary$count)

# Figure creation ----
ggplot(flattened_summary, aes(y = reorder(name, count), x = count, fill = name)) +
geom_bar(stat = "identity") +
theme_classic(base_size = 15) +
theme(legend.position = "none") +
labs(x = "Count", y = "Type")

12 changes: 6 additions & 6 deletions paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ @ARTICLE{Hapich:2022
number = 1,
pages = "15",
month = jun,
year = 2022
year = 2022,
doi = "10.1186/s43591-022-00035-1"
}

@misc{Waterboards:2018,
Expand All @@ -108,11 +109,10 @@ @article{vanLieshout:2020
number = {8},
pages = {e2019EA000960},
keywords = {plastic pollution, object detection, automated monitoring, deep learning, artificial intelligence, river plastic},
doi = {https://doi.org/10.1029/2019EA000960},
doi = {10.1029/2019EA000960},
url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2019EA000960},
eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2019EA000960},
note = {e2019EA000960 10.1029/2019EA000960},
abstract = {Abstract Quantifying plastic pollution on surface water is essential to understand and mitigate the impact of plastic pollution to the environment. Current monitoring methods such as visual counting are labor intensive. This limits the feasibility of scaling to long-term monitoring at multiple locations. We present an automated method for monitoring plastic pollution that overcomes this limitation. Floating macroplastics are detected from images of the water surface using deep learning. We perform an experimental evaluation of our method using images from bridge-mounted cameras at five different river locations across Jakarta, Indonesia. The four main results of the experimental evaluation are as follows. First, we realize a method that obtains a reliable estimate of plastic density (68.7\% precision). Our monitoring method successfully distinguishes plastics from environmental elements, such as water surface reflection and organic waste. Second, when trained on one location, the method generalizes well to new locations with relatively similar conditions without retraining (≈50\% average precision). Third, generalization to new locations with considerably different conditions can be boosted by retraining on only 50 objects of the new location (improving precision from ≈20\% to ≈42\%). Fourth, our method matches visual counting methods and detects ≈35\% more plastics, even more so during periods of plastic transport rates of above 10 items per meter per minute. Taken together, these results demonstrate that our method is a promising way of monitoring plastic pollution. By extending the variety of the data set the monitoring method can be readily applied at a larger scale.},
year = {2020}
}

Expand Down Expand Up @@ -145,7 +145,8 @@ @ARTICLE{Lynch:2018
number = 1,
pages = "6",
month = jun,
year = 2018
year = 2018,
doi = "10.1186/s40965-018-0050-y"
}


Expand Down Expand Up @@ -176,7 +177,7 @@ @article{Majchrowska:2022
pages = {274-284},
year = {2022},
issn = {0956-053X},
doi = {https://doi.org/10.1016/j.wasman.2021.12.001},
doi = {10.1016/j.wasman.2021.12.001},
url = {https://www.sciencedirect.com/science/article/pii/S0956053X21006474},
author = {Sylwia Majchrowska and Agnieszka Mikołajczyk and Maria Ferlin and Zuzanna Klawikowska and Marta A. Plantykow and Arkadiusz Kwasigroch and Karol Majek},
keywords = {Object detection, Semi-supervised learning, Waste classification benchmarks, Waste detection benchmarks, Waste localization, Waste recognition},
Expand All @@ -193,4 +194,3 @@ @misc{Proença:2020
year = {2020},
copyright = {arXiv.org perpetual, non-exclusive license}
}

Loading