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

Modify fcnn.predict to Accept Image NumPy Array Instead of Image Path #93

Open
Abbsalehi opened this issue Aug 26, 2024 · 4 comments
Open

Comments

@Abbsalehi
Copy link

Abbsalehi commented Aug 26, 2024

Description:

Dear contributors,

Thanks for your all efforts, currently, the fcnn.predict function in FasterRCNN accepts just an image path as input. This approach is limiting, especially in workflows where images are already loaded into memory as NumPy arrays for preprocessing or augmentation. Allowing fcnn.predict to accept a NumPy array directly would enhance flexibility and efficiency, avoiding the need for redundant disk I/O operations.

Proposed change:

Modify the fcnn.predict method to accept a NumPy array representing the image, in addition to the existing option of providing an image path. The method should be able to detect the input type and handle it accordingly. For instance:

If the input is a string, assume it’s a file path and load the image as currently done.
If the input is a NumPy array, use the array directly for prediction.

image_array = np.array([...])  # Image loaded as a NumPy array

[bbx, _, score] = fcnn.predict(image_array,...)

I would highly appreciate it if you could modify this!

@scw
Copy link
Collaborator

scw commented Aug 26, 2024

@Abbsalehi Thanks for your suggestion! I've brought this to the attention to the team that works on these prediction function signatures.

@Abbsalehi
Copy link
Author

@scw thanks for your reply! Looking forward to hearing from you!

@KDeser
Copy link

KDeser commented Dec 17, 2024

Any updates on this? This is pretty standard functionality for deep learning workflows!

@Abbsalehi
Copy link
Author

Any updates on this? This is pretty standard functionality for deep learning workflows!

I'm still waiting for their update!

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

No branches or pull requests

4 participants
@scw @Abbsalehi @KDeser and others