You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, forewarning that I have very little experience with image processing and Torch. I have not touched the configuration files at the moment. Currently trying to pass URLs to the analyzer, but I keep running into the following error:
"File \"C:\\Users\\win1\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\torchvision\\transforms\\_functional_tensor.py\", line 926, in normalize
if std.ndim == 1:
std = std.view(-1, 1, 1)
return tensor.sub_(mean).div_(std)
~~~~~~~~~~~ <--- HERE
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 1"
Replacing the configuration variables with their values for bath_size, fix_img_size, return_img_data, and include_tensors, this is my current endpoint:
I also tried to pass a PIL Image.Image object directly (again, I need to first convert this into RGB form which makes sense, the same dimension-matching error pops up if I do not), but despite the type matching, it appears that the detector is not finding any faces, i.e.:
Thank you for the detailed report! The runtime error seems to stem from mismatched image channels, likely due to an alpha channel (RGBA) in some inputs. While you correctly convert PIL images to RGB, this might not be happening for images loaded from URLs. I’ve updated the read_pil_image and read_numpy_array methods in version 0.5.1 to ensure all inputs are properly converted to RGB before processing, which should resolve this issue.
Regarding the detector not finding faces: This could be due to the current configuration of the RetinaFace detector postprocessor. I suggest trying different settings to better match your use case. Specifically, you might want to adjust the following parameters in your configuration file:
confidence_threshold: Increase it to filter out low-confidence detections.
score_threshold: Experiment with lowering it to allow detections with lower confidence scores.
expand_box_ratio: Increase it slightly if faces near the image edges are being missed.
These adjustments can help fine-tune detection results. Please update to version 0.5.1 and let me know if these changes help or if you need further guidance!
Hi there, forewarning that I have very little experience with image processing and Torch. I have not touched the configuration files at the moment. Currently trying to pass URLs to the analyzer, but I keep running into the following error:
Replacing the configuration variables with their values for bath_size, fix_img_size, return_img_data, and include_tensors, this is my current endpoint:
Here's an example output:
I also tried to pass a
PIL Image.Image
object directly (again, I need to first convert this into RGB form which makes sense, the same dimension-matching error pops up if I do not), but despite the type matching, it appears that the detector is not finding any faces, i.e.:With output:
Would appreciate any help! The reader works perfectly fine if an image path is given.
The text was updated successfully, but these errors were encountered: