-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Stuck at "Reading Image" #64
Comments
Based on the issue you've described where the process gets stuck at 'Reading Image', it seems that the step of writing and reading the image from disk could be the bottleneck or point of failure. Fortunately, with the introduction of the The
Here is a conceptual example of how you might modify your def process(frame):
# Convert your frame to a tensor or bytes format as required
# Example for a tensor conversion; adjust as necessary for your data and model
tensor_image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
tensor_image = transforms.ToTensor()(tensor_image)
# Directly pass the tensor to the analyzer
response = analyzer.run(
image_source=tensor_image, # Use the tensor here
batch_size=cfg.batch_size,
fix_img_size=cfg.fix_img_size,
return_img_data=cfg.return_img_data,
include_tensors=cfg.include_tensors,
)
print(response)
output = {face.index: face.preds["deepfake"].other["multi"] for face in response.faces}
print(output)
return(output) Please adjust the tensor conversion process based on your specific requirements and the expected format of your model. This approach should eliminate the need for temporary files and might resolve the issue you're experiencing. If you're still encountering problems or have any further questions, feel free to reach out! |
Stuck at "Reading Image" when running the analyzer.
The text was updated successfully, but these errors were encountered: