This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- tracking from video or zip - upload image file and visualize predictions - upload image as JSON to get predictions - upgrade werkzeug requirements - change the way we handle zip files (recursively move files to root)
- Loading branch information
Showing
16 changed files
with
459 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,3 +155,5 @@ images_errors.csv | |
|
||
# patch files | ||
*.py.patch | ||
|
||
tmp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import multiprocessing | ||
|
||
|
||
# app configuration | ||
UPLOAD_FOLDER = "static/tmp" | ||
TMP_IMAGE_NAME = "tmp_image.jpg" | ||
SERVING_URL = "http://localhost:8501" # the url where the tf-serving container exposes the model | ||
CPU_COUNT = min(int(multiprocessing.cpu_count() / 2), 32) | ||
|
||
|
||
# video settings | ||
FPS = 4 | ||
RESOLUTION = (1024, 768) | ||
SUM_THRESHOLD = 0.6 # the sum of scores for all classes must be greater than this value | ||
|
||
# object detection settings | ||
CLASS_NAMES = ["bottles", "others", "fragments"] | ||
# for the prediction to be kept | ||
CLASS_TO_THRESHOLD = {"bottles": 0.7, "others": 0.7, "fragments": 0.7} | ||
DEFAULT_THRESHOLD = 0.5 # default threshold applied when the class isn't in CLASS_TO_THRESHOLD | ||
|
||
|
||
CLASS_NAME_TO_COLOR = { | ||
"bottles": (255, 0, 0), | ||
"others": (0, 255, 0), | ||
"fragments": (0, 0, 255), | ||
} |
Oops, something went wrong.