snowzach / doods2

API for detecting objects in images and video streams using Tensorflow
MIT License
232 stars 30 forks source link

Deepstack model error #38

Closed JustinGeorgi closed 2 years ago

JustinGeorgi commented 2 years ago

Love the new rewrite! I'd been using v1 for some time and just moved over to v2 container recently. Great stuff!

The recent addition of the deepstack models does not seem to be working. I see in issue #28 after it was closed that there's a report that trying to get a deepstack model working resulted in a error. I'm getting the same error with two different .pt models

Error:

2022-03-12 21:30:35,452 - uvicorn.access - INFO - 172.17.0.1:36888 - "POST /detect HTTP/1.1" 500
2022-03-12 21:30:35,452 - uvicorn.error - ERROR - Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 208, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 181, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 57, in __call__
    task_group.cancel_scope.cancel()
  File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 574, in __aexit__
    raise exceptions[0]
  File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 30, in coro
    await self.app(scope, request.receive, send_stream.send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__
    raise exc
  File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app
    response = await func(request)
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app
    raw_response = await run_endpoint_function(
  File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 159, in run_endpoint_function
    return await dependant.call(**values)
  File "/opt/doods/api.py", line 40, in detect
    detect_response = self.doods.detect(detect_request)
  File "/opt/doods/doods.py", line 127, in detect
    ret = detector.detect(image)
  File "/opt/doods/detectors/deepstack.py", line 45, in detect
    results = self.torch_model(image, augment=False)[0]
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 126, in forward
    return self._forward_once(x, profile, visualize)  # single-scale inference, train
  File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 149, in _forward_once
    x = m(x)  # run
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 61, in forward
    if self.inplace:
  File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1177, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Detect' object has no attribute 'inplace'

Both of the models work with the deepstack service itself, and doods properly reports the labels embedded in the models

    {
      "name": "dark",
      "type": "deepstack",
      "model": "external/models/dark.pt",
      "labels": [
        "Bicycle",
        "Boat",
        "Bottle",
        "Bus",
        "Car",
        "Cat",
        "Chair",
        "Cup",
        "Dog",
        "Motorbike",
        "People",
        "Table"
      ],
      "width": 0,
      "height": 0
    },
    {
      "name": "combined",
      "type": "deepstack",
      "model": "external/models/combined.pt",
      "labels": [
        "person",
        "bicycle",
        "car",
        "motorcycle",
        "bus",
        "truck",
        "bird",
        "cat",
        "dog",
        "horse",
        "sheep",
        "cow",
        "bear",
        "deer",
        "rabbit",
        "raccoon",
        "fox",
        "coyote",
        "possum",
        "skunk",
        "squirrel",
        "pig",
        ""
      ],
      "width": 0,
      "height": 0
    }

so the models seem intact.

My config for the two models is minimal:

    - name: dark
      type: deepstack
      modelFile: external/models/dark.pt
    - name: combined
      type: deepstack
      modelFile: external/models/combined.pt

do I need more than that or is there some issue with the deepstack integration at the moment?

ozett commented 2 years ago

maybe needs to investigate it its a compatible-bug between models trained on older yolo versions?

see -> https://github.com/ultralytics/yolov5/issues/5234#issuecomment-946854334 or my comment on openlogo.pt-model -> https://github.com/snowzach/doods2/issues/28#issuecomment-1072968647

snowzach commented 2 years ago

I am wondering if this is the same issue where it's trying to use Yolo6 and I need to figure out how to make it use yolo5

snowzach commented 2 years ago

Okay.... I just looked into this more.. the OpenLogo detector is working fine for me. I suspect that this is an issue where it cannot properly convert whatever image type you are working with into the one that Deepstack expects. Where are you getting your image data? Do you know if it's just normal RGB data or maybe has an Alpha channel or something? Can you share an image file?

ozett commented 2 years ago

no-panic-6-250x250

does this image features survive here? as i upload it, i see that i looks like alpha-channel image... maybe thats it? this image works well with yolo5

ozett commented 2 years ago

maybe an interference with some models from my config?

root@ub-doods2:/usr/src# cat example.yaml
doods:
  detectors:
    - name: default-org
      type: tflite
      modelFile: models/coco_ssd_mobilenet_v1_1.0_quant.tflite
      labelFile: models/coco_labels0.txt
      numThreads: 0
      numConcurrent: 4
    - name: edgetpu
      type: tflite
      modelFile: models/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite
      labelFile: models/coco_labels0.txt
      numThreads: 0
      numConcurrent: 4
      hwAccel: false
    - name: tensorflow
      type: tensorflow
      modelFile: models/faster_rcnn_inception_v2_coco_2018_01_28.pb
      labelFile: models/coco_labels1.txt
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4
    - name: default
      type: tflite
      modelFile: models/lite-model_aiy_vision_classifier_birds_V1_3.tflite
      labelFile: models/aiy_birds_V1_labelmap.csv
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4
      hwAccel: false
    - name: pybirds
      type: pytorch
      modelFile: nicolalandro/ntsnet-cub200,ntsnet
      width: 600
      height: 600
      numThreads: 0
      numConcurrent: 4
    - name: yolo5
      type: pytorch
      modelFile: ultralytics/yolov5,yolov5s
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4
    - name: logodeep
      type: deepstack
      modelFile: models/openlogo.pt
      width: 640
      height: 640
      numThreads: 0
      numConcurrent: 4
ozett commented 2 years ago

Oops, whats this? i left only openlogo in the config alone:

image

ozett commented 2 years ago

my config:

doods:
  detectors:
    - name: yolo5
      type: pytorch
      modelFile: ultralytics/yolov5,yolov5s
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4
    - name: logodeep
      type: pytorch
      modelFile: models/openlogo.pt
      width: 640
      height: 640
      numThreads: 0
      numConcurrent: 4

now this:

image

ozett commented 2 years ago

i have to have yolo5 in the config, than no error on startup. but still processing error

image

config (now openlogo as deepstack-type):

doods:
  detectors:
    - name: yolo5
      type: pytorch
      modelFile: ultralytics/yolov5,yolov5s
      width: 224
      height: 224
      numThreads: 0
      numConcurrent: 4
    - name: logodeep
      type: deepstack
      modelFile: models/openlogo.pt
      width: 640
      height: 640
      numThreads: 0
      numConcurrent: 4
ozett commented 2 years ago

i test with the image from the openlogo-site, but still that error

Testimage: https://github.com/OlafenwaMoses/DeepStack_OpenLogo/blob/main/images/fedex_detected.jpg?raw=true

Error: image

ozett commented 2 years ago

Uhhhh, i was behind the "latest" docker...

PULL! image

and test now...

ozett commented 2 years ago

did not help:

image

ozett commented 2 years ago

testimage still not work. seems to be interference with yolo5 (verstion 6= yolo5s6 did also not help)

TESTIMAGE: https://raw.githubusercontent.com/OlafenwaMoses/DeepStack_OpenLogo/main/images/fedex.jpg

JustinGeorgi commented 2 years ago

I get the same failure of the doods deepstack models no matter what image I use.

doods2 (tensorflow model) -> success doods2 (pytorch model) -> success deepstack instance -> success doods2 (deepstack model) -> error

Occasionally the error is different, so maybe there is more than one issue here. Most of the time I get the error in my original post

AttributeError: 'Detect' object has no attribute 'inplace'

but on some images I get the same error ozett has just reported in several posts

RuntimeError: The expanded size of the tensor (1) must match the existing size (48) at non-singleton dimension 3.  Target sizes: [1, 3, 1, 1, 2].  Tensor sizes: [3, 80, 48, 2]

Here's one of my example images

snowzach commented 2 years ago

Soooo this is interesting... It appears to be some sort of collision with having a pytorch detector enabled along with the deepstack detector. If I disable pytorch the logo detector works fine. That gives me something reproducible to look into at least.

ozett commented 2 years ago

single config of deepstack-type with openlogo throws error on my install. cannot confirm that it works. see this error:

image

JustinGeorgi commented 2 years ago

I can confirm that deepstack models fail to load if I remove pytorch from my configuration.

2022-03-20 16:41:30,151 - doods.doods - ERROR - Could not create detector deepstack/dark: No module named 'models.yolo'
2022-03-20 16:41:30,151 - doods.doods - ERROR - Could not create detector deepstack/combined: No module named 'models.yolo'
snowzach commented 2 years ago

Are you able to share a model?

JustinGeorgi commented 2 years ago

My deepstack/dark model is based on the pt file that can be downloaded here: https://github.com/OlafenwaMoses/DeepStack_ExDark/releases/tag/v1

Given that I do get it to work with the deepstack server, I assume the file I downloaded is complete and intact. But here's my local copy as well: https://drive.google.com/file/d/1lM4QAEQx83Tb7j1Hxqz4Yv9mGW3mYq16

snowzach commented 2 years ago

Okay, I think I fixed part of the issue. It was missing some of the deepstack trainer files it needed to start the dark model. I pushed an image if you want to try that. The issue still remains if you also load the latest yolo model as well, it will print the other error about mismatched tensor sizes. I am still trying to figure that one out.

JustinGeorgi commented 2 years ago

The new image works as advertised. As long as I don't load up pytorch, both my deepstack based models now work without errors so that's big step in the right direction.

ozett commented 2 years ago

i got the downloaded openlogo.pt model to work with the yolo5 "detect.py" script. in my first experiments:

https://github.com/snowzach/doods2/issues/28#issuecomment-1024890510

so i assume, i could be working like yolo5 in the doods2-envrionment . without changing the model.pt file. but i am not capable to analyse the "detect.py " loading process.

but maybe that hint helps you

snowzach commented 2 years ago

Okay, I hacked together something. I don't love it but it works. It basically tries the new model way of doing it and if fails it reverts back to the old way. It shouldn't add too much delay. Let me know if it works for you.

ozett commented 2 years ago

image

ozett commented 2 years ago

nope. not really....

image

ozett commented 2 years ago

works with openlogo config only....

image

not with more config-options like normal -> https://github.com/snowzach/doods2/issues/38#issuecomment-1073274642 than still a failure:

Toggle the Error-Report ``` 2022-03-22 07:38:46,418 - uvicorn.error - ERROR - Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 208, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 57, in __call__ task_group.cancel_scope.cancel() File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 572, in __aexit__ raise ExceptionGroup(exceptions) anyio._backends._asyncio.ExceptionGroup: 2 exceptions were raised in the task group: ---------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 55, in __call__ response = await self.dispatch_func(request, call_next) File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 172, in dispatch_middleware raise e from None File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 169, in dispatch_middleware response = await call_next(request) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 37, in call_next raise RuntimeError("No response returned.") RuntimeError: No response returned. ---------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 30, in coro await self.app(scope, request.receive, send_stream.send) File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__ raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app response = await func(request) File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 159, in run_endpoint_function return await dependant.call(**values) File "/opt/doods/api.py", line 111, in image detect_response = self.doods.detect(detect_request) File "/opt/doods/doods.py", line 127, in detect ret = detector.detect(image) File "/opt/doods/detectors/deepstack.py", line 45, in detect results = self.torch_model(image, augment=False)[0] File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 126, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 149, in _forward_once x = m(x) # run File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "/root/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py", line 58, in forward self.grid[i], self.anchor_grid[i] = self._make_grid(nx, ny, i) RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 52, 80, 2] 2022-03-22 07:38:46,423 - uvicorn.access - INFO - 192.168.14.135:49687 - "POST /image HTTP/1.1" 500 ```
snowzach commented 2 years ago

I had to fix an issue with no detections but it seems to work fine for me with this config

logger:
  level: debug
doods:
  detectors:
    - name: default
      type: tflite
      modelFile: models/coco_ssd_mobilenet_v1_1.0_quant.tflite
      labelFile: models/coco_labels0.txt
    - name: logos
      type: deepstack
      modelFile: models/openlogo.pt
    - name: dark
      type: deepstack
      modelFile: models/dark.pt
    - name: lp
      type: deepstack
      modelFile: models/licence-plate.pt
    - name: yolo5
      type: pytorch
      modelFile: ultralytics/yolov5,yolov5s

Make sure you don't have the yolo source files sitting around anywhere, especially in your models directory as it can inadvertently import that.

snowzach commented 2 years ago

So this is interesting... If you load pytorch/yolo before deepstack models, it will fail. If you load deepstack models first, it works fine...

ozett commented 2 years ago

So this is interesting... If you load pytorch/yolo before deepstack models, it will fail. If you load deepstack models first, it works fine...

i will try this order, seems doable

ozett commented 2 years ago

looks like a hit.

then i would like to thank you very much for this. i am so glad that you found time to look for it. maybe you will also find the real error. then just post here. i like to test . now i'll try to build a node-red flow that will be fed with the logos. thanks again so much!

image

JustinGeorgi commented 2 years ago

Thank you! That works for me too (as long as the config order is correct). I'll consider this issue closed, even if this is only a temporary fix till you find a solution you like better.

ozett commented 2 years ago

sorry to bother again, but please try this image (will fail):

thumbnail

with this:

image

ozett commented 2 years ago

log-output:

Toggle the Error-Report ``` Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 55, in __call__ response = await self.dispatch_func(request, call_next) File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 172, in dispatch_middleware raise e from None File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 169, in dispatch_middleware response = await call_next(request) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 37, in call_next raise RuntimeError("No response returned.") RuntimeError: No response returned. ---------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 30, in coro await self.app(scope, request.receive, send_stream.send) File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__ raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app response = await func(request) File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 159, in run_endpoint_function return await dependant.call(**values) File "/opt/doods/api.py", line 46, in detect detect_response = self.doods.detect(detect_request) File "/opt/doods/doods.py", line 127, in detect ret = detector.detect(image) File "/opt/doods/detectors/deepstack.py", line 49, in detect for *xyxy, conf, cls in reversed(results): TypeError: 'NoneType' object is not reversible 2022-03-22 15:30:43,582 - uvicorn.access - INFO - 192.168.14.211:36942 - "POST /detect HTTP/1.1" 500 2022-03-22 15:31:29,990 - uvicorn.error - ERROR - Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 373, in run_asgi result = await app(self.scope, self.receive, self.send) File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 208, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 112, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 159, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 57, in __call__ task_group.cancel_scope.cancel() File "/usr/local/lib/python3.8/dist-packages/anyio/_backends/_asyncio.py", line 572, in __aexit__ raise ExceptionGroup(exceptions) anyio._backends._asyncio.ExceptionGroup: 2 exceptions were raised in the task group: ---------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 55, in __call__ response = await self.dispatch_func(request, call_next) File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 172, in dispatch_middleware raise e from None File "/usr/local/lib/python3.8/dist-packages/prometheus_fastapi_instrumentator/instrumentation.py", line 169, in dispatch_middleware response = await call_next(request) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 37, in call_next raise RuntimeError("No response returned.") RuntimeError: No response returned. ---------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/base.py", line 30, in coro await self.app(scope, request.receive, send_stream.send) File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 82, in __call__ raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/exceptions.py", line 71, in __call__ await self.app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 656, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 259, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 61, in app response = await func(request) File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 226, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 159, in run_endpoint_function return await dependant.call(**values) File "/opt/doods/api.py", line 111, in image detect_response = self.doods.detect(detect_request) File "/opt/doods/doods.py", line 127, in detect ret = detector.detect(image) File "/opt/doods/detectors/deepstack.py", line 49, in detect for *xyxy, conf, cls in reversed(results): TypeError: 'NoneType' object is not reversible
ozett commented 2 years ago

testimage still works: https://raw.githubusercontent.com/OlafenwaMoses/DeepStack_OpenLogo/main/images/fedex.jpg

new testimage also works: https://assets.entrepreneur.com/content/3x2/2000/20160210172912-branding-logos-companies-businesses-identity.jpeg

myimage fails:
https://user-images.githubusercontent.com/5937811/159519375-f4d7ece2-6b81-49a4-b8f5-2a909661e752.jpg

ozett commented 2 years ago

its not because of the tiny size.

logotest3

this is 10px smaller than the tumbnail.jpg, but still works. must be something else

ozett commented 2 years ago

a bigger image, that dont work

logotest-snapshot

@themoment some github failures?

ozett commented 2 years ago

sometimes its working,

but somehow i miss the marked image in the response. do i miss an option in the request? edit: found the option for image-request. sorry, my bad

image

snowzach commented 2 years ago

@ozett make sure you are pulling the latest image. I made a change that should fix the NoneType error you see. @JustinGeorgi it should automatically reorder the detectors so you don't need to worry about the order you put in your config.

ozett commented 2 years ago

i will try next 60 minutes... thx. (great news!)

ozett commented 2 years ago

pulled in milliseconds, running fine now with my first failure-image. will let my new flow run over it for today for test.
really GREAT, thanks a lot, appreciate this!

doods2 is getting more and more multifunctional and failsafe!

image

ozett commented 2 years ago

flow is running, needs fine-tuning and for croping the region i was wondering where is your image origin ? where is top and bottom of the image? like on opencv?

i need to provide region-coordinates for detections of x,y,w,h and cant fiddle it right

TESTIMAGE https://www.clickedstudios.com/wp-content/uploads/2019/02/2019-luxury-top-brands-feature.png

image

ozett commented 2 years ago

figured it out, activated lost memory. coordinates are nomalized.. -> https://www.tensorflow.org/api_docs/python/tf/image/draw_bounding_boxes

snowzach commented 2 years ago

Okay, closing this issue.