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

Add bicycle inside image detection for new BikeTag Post submissions. #206

Open
KenEucker opened this issue Dec 2, 2023 · 1 comment
Open
Labels
enhancement New feature or request Fund help wanted Extra attention is needed

Comments

@KenEucker
Copy link
Owner

KenEucker commented Dec 2, 2023

Is your feature request related to a problem? Please describe.
Currently, Players of BikeTag can upload any image to the site.

Describe the solution you'd like
We can use ML, specifically ml5.js, to detect whether or not a bicycle is present in the image. If a bicycle is not present, the Player should see a similar popup to when an image is submitted outside of the boundary of a game: "The photo you uploaded does not appear to have a bicycle in it. Please upload a photo with a bicycle clearly visible."

Additionally, since BikeTag Posts are not "selfies", we could detect whether or not a "face" is present in the photo and reject is based on that. The API method that handles this, validateBikeTagImage, should return a boolean for valid and an error object, which is undefined if it is a valid image.

Describe alternatives you've considered
We've talked about this in the past and some solutions were discussed then. Now, after looking into it for a few minutes, I've chosen ml5.js. Other solutions are available and anything that is free will be considered.

Additional context
ML5JS - Object Detector

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@KenEucker KenEucker added enhancement New feature or request help wanted Extra attention is needed labels Dec 2, 2023
@KenEucker
Copy link
Owner Author

Here's the relevant ML5JS code:

// When the model is loaded
function modelLoaded() {
  console.log('Model Loaded!');
}

// Create a ObjectDetector method
const objectDetector = ml5.objectDetector('cocossd', {}, modelLoaded);

// Detect objects in the image element
objectDetector.detect(image, (err, results) => {
  console.log(results); // Will output bounding boxes of detected objects
});

@polar-sh polar-sh bot added the Fund label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fund help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant