Esri / Esri/deep-learning-frameworks

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

Open
#93 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
649
Forks
137
Avg merge
6d 5h
Merged PRs (30d)
1

Description

### 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.

```python
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!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.