Skip to content

Conversation

@jw098
Copy link
Collaborator

@jw098 jw098 commented Nov 26, 2025

No description provided.


output_image_embedding.clear();
embedding_session.run(resized_mat, output_image_embedding);
while (true){
Copy link
Collaborator

Choose a reason for hiding this comment

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

while true feels dangerous to me. Can you rewrite it to avoid while(true)?

m_yolo_session->run(frame_mat_rgb, m_output_boxes);

// fall back to CPU if fails with GPU.
for(size_t i = 0;;i++){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here. Don't use for infinite for loop when you can just have two calls of the session run, one for gpu, and one for cpu if exception is caught.

#elif _WIN32
#define ENABLE_WIN_GPU
#ifdef ENABLE_WIN_GPU
if (use_gpu){
Copy link
Collaborator

Choose a reason for hiding this comment

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

APPLE's impelemention should be inside this if(use_gpu) as well

@Gin890 Gin890 merged commit 3457737 into PokemonAutomation:main Nov 26, 2025
6 checks passed
@jw098 jw098 deleted the ml branch November 26, 2025 16:47
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