Skip to content

Conversation

@gvzdv
Copy link
Contributor

@gvzdv gvzdv commented Oct 28, 2025

  • Add area and centroid values to the output of the object-detection-llm preprocessor.
  • Increase the object-detection-llm timeout to 75 seconds to allow for processing of complex graphics.
  • Add a prompt rule regarding confidence scores.
  • Lower confidence threshold to include more objects.

Required Information

  • I referenced the issue addressed in this PR.
  • I described the changes made and how these address the issue.
  • I described how I tested these changes.

Coding/Commit Requirements

  • I followed applicable coding standards where appropriate (e.g., PEP8)
  • I have not committed any models or other large files.

New Component Checklist (mandatory for new microservices)

  • I added an entry to docker-compose.yml and build.yml.
  • I created A CI workflow under .github/workflows.
  • I have created a README.md file that describes what the component does and what it depends on (other microservices, ML models, etc.).

OR

  • I have not added a new component in this PR.

Copy link
Member

@jeffbl jeffbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but please consider comments before merging. Some are "future us" problems like the timeout, but I wanted to have that issue refer to this one, since it probably won't be obvious that timeout is overridden directly in Dockerfile when we eventually implement #1077.

HEALTHCHECK --interval=60s --timeout=10s --start-period=120s --retries=5 CMD curl -f http://localhost:5000/health || exit 1

CMD [ "gunicorn", "object-detection-llm:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug" ] No newline at end of file
CMD [ "gunicorn", "object-detection-llm:app", "-b", "0.0.0.0:5000", "--capture-output", "--log-level=debug", "--timeout", "75"] No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout adjustments should really be done in docker-compose, but that isn't implemented until #1077 is complete.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything I can do about it now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of anything since #1077 is not implemented. But at least these comments should show up there now. :)

restart: "no"
environment:
- CONF_THRESHOLD=0.9
- CONF_THRESHOLD=0.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could argue this should be settable in docker-compose, so that it can be tuned by people who have different requirements for number of items vs. accuracy, or who change the model used, and the confidence scale shifts.

As discussed in slack earlier, filtering should also really be a handler issue in the long-run. So confidence threshold should be tuned to "too much" rather than "too little" and individual handlers can decide what tradeoffs they want to make.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is settable in docker-compose, or am I missing something?

Do you want me to change the threshold to 0 and let handers decide what they want to do?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, go with a threshold you're comfortable with, since we don't have anyone to implement handler changes at this point. But this needs to be resolved in the future. And, great it is settable in docker-compose. Didn't remember that!

3. Use simple and common object labels (e.g., "car", "person", "tree").
4. Include only objects that are clearly visible and identifiable.
5. Focus on the major and important objects in the image.
6. Several objects can have the same confidence score.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading this as a human, I get what you mean, but literally, "several" can be interpreted as 3, or more vaguely, a small number less than 5. I don't know if this has potential to confuse LLM, but "Multiple" is more accurate since it does not imply a low number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you. Fixed.

for idx, obj in enumerate(filtered):
obj['ID'] = idx

x1, y1, x2, y2 = obj["dimensions"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't expect to find this in a function "filter_objects" since it has nothing to do with filtering. make function name more generic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, renamed.

@jeffbl jeffbl assigned gvzdv and unassigned jeffbl Oct 29, 2025
@gvzdv
Copy link
Contributor Author

gvzdv commented Oct 29, 2025

Before merging, assigning to @jeffbl to make sure I understood all comments correctly and implemented all needed fixes.

@gvzdv gvzdv assigned jeffbl and unassigned gvzdv Oct 29, 2025
Copy link
Member

@jeffbl jeffbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@jeffbl jeffbl merged commit 1245b7e into main Oct 29, 2025
2 checks passed
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.

3 participants