Skip to content

Maintenance updates#69

Open
jangho11 wants to merge 22 commits into
imfing:mainfrom
jangho11:main
Open

Maintenance updates#69
jangho11 wants to merge 22 commits into
imfing:mainfrom
jangho11:main

Conversation

@jangho11

Copy link
Copy Markdown

Key changes:
Resize function, Docker Command condensed, security hardening, +EfficientNetB0, +Top-3 predictions

jangho11 and others added 20 commits February 16, 2026 10:23
Replaced MobileNetV2 with ResNet50V2 and updated preprocessing method.
Refactor prediction result formatting to include top-3 results with probabilities.
Add decoding of model predictions to retrieve top-3 labels.
Resize is now modular, fixed a requirement and image conversion issue as well
Docker compose added for easier start up/teardown commands. Note: seems to be a bit slower than running the build and run commands separately, but allows for an easy, short, one command to build the container.
1/3  in size and slightly better accuracy
Added input validation for image uploads and error handling.
Security & Validation (Corrective Maintenance):
- Add 16MB file size limit to prevent DoS attacks
- Add ALLOWED_EXTENSIONS whitelist for file type validation
- Add allowed_file() helper function for extension checking
- Add JSON request validation (checks for missing or empty data)
- Add image data key validation (checks 'data' key exists)
- Add try/except on base64 conversion to handle invalid input
- Add None check after image conversion
- Add RGB/RGBA color mode validation
- Add try/except on model_predict() to prevent server crash
- Add 413 error handler for file size exceeded
Added validation for allowed image formats.
It was still taking pdf or other exe files as well
Add validation for image data and allowed MIME types.
Removed file type validation for base64 image data.
IMG not loaded.
Added validation for base64 image input and error handling for file size and invalid formats.
Refactor response handling for image prediction results to meet input validation purpose
Apache 2.0 License appendix updated

Copyright 2019 imfing (original work)
Copyright 2026 Noah Rose, Jangho Keum (modifications)
@jangho11 jangho11 changed the title Some upgrade Maintenance updates Apr 21, 2026
jangho11 and others added 2 commits April 24, 2026 20:51
Added a security policy document outlining supported versions and vulnerability reporting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants