fcakyon / streamlit-image-comparison

Image comparison slider component for Streamlit

Home Page:https://huggingface.co/spaces/fcakyon/streamlit-image-comparison

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

predict is not working

kadirnar opened this issue · comments

It gives an error when I upload a photo and run it.

Error Mesage:

File "/home/user/.local/lib/python3.8/site-packages/streamlit/script_runner.py", line 354, in _run_script
    exec(code, module.__dict__)
File "/home/user/app/app.py", line 208, in <module>
    output_1, output_2 = sahi_mmdet_inference(
File "/home/user/app/utils.py", line 24, in sahi_mmdet_inference
    prediction_result_1 = sahi.predict.get_prediction(
File "/home/user/.local/lib/python3.8/site-packages/sahi/predict.py", line 80, in get_prediction
    detection_model.perform_inference(np.ascontiguousarray(image_as_pil), image_size=image_size)
File "/home/user/.local/lib/python3.8/site-packages/sahi/model.py", line 235, in perform_inference
    prediction_result = inference_detector(self.model, image)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/apis/inference.py", line 129, in inference_detector
    data = test_pipeline(data)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/datasets/pipelines/compose.py", line 41, in __call__
    data = t(data)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/datasets/pipelines/test_time_aug.py", line 107, in __call__
    data = self.transforms(_results)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/datasets/pipelines/compose.py", line 41, in __call__
    data = t(data)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/datasets/pipelines/transforms.py", line 656, in __call__
    self._pad_img(results)
File "/home/user/.local/lib/python3.8/site-packages/mmdet/datasets/pipelines/transforms.py", line 622, in _pad_img
    padded_img = mmcv.impad(
File "/home/user/.local/lib/python3.8/site-packages/mmcv/image/geometric.py", line 486, in impad
    assert len(pad_val) == img.shape[-1]

@kadirnar this project is for sliding comparison effect only and does not perform any prediction. You most probably opened the issue in the wrong repo :)

this issue related with sahi huggingface demo, you are opening the issue in the wrong repo :)