NickM-27 / swatch

Color detection in images to capture presense of known objects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't install

rcdemuth opened this issue · comments

Describe the problem you are having

I get the following error when I try to install Swatch. I initially tried to upgrade to 3.1, when that didn't work I tried to uninstall and reinstall swatch.

Failed to install add-on
Can't install crzynik/swatch:3.1.0: 404 Client Error for http+docker://localhost/v1.41/images/create?tag=3.1.0&fromImage=crzynik%2Fswatch&platform=linux%2Famd64: Not Found ("manifest for crzynik/swatch:3.1.0 not found: manifest unknown: manifest unknown")

Updating home assistant doesn't help, restarting ha doesn't help. Restarting the machine doesn't help

I'd love to know what's going on.

Screenshot_20220708-203308_Home Assistant

Version

3.1

Swatch config file

objects:
  # REQUIRED: Name of the object
  tube_light:
    # REQUIRED: the list of color variants that this object can be detected as. Useful for
    # different lighting conditions
    color_variants:
      # REQUIRED: the name of the color variant
      default:
        # REQUIRED: the lower R, G, B values that are considered a potential match for the
        # color variant of the object.
        color_lower: 70, 70, 0
        # REQUIRED: the upper R, G, B values that are considered a potential match for the
        # color variant of the object.
        color_upper: 110, 100, 50
        # OPTIONAL: the time range for when this color variant is allowed
        # NOTE: make sure that /etc/localtime is passed to the container so it has valid time
        time_range:
          # OPTIONAL: Color variant is valid if current time is > this 24H time (Default: shown below).
          after: "00:00"
          # OPTIONAL: Color variant is valid if current time is < this 24H time (Default: shown below).
          before: "24:00"
    # OPTIONAL: the min area of the bounding box around groups of matching R, G, B pixels
    # considered a true positive. This is not recommended to be set as a super small amount
    # could be a false positive. (Default: shown below)
    min_area: 2
    # OPTIONAL: the max area of the bounding box around groups of pixels with R, G, B
    # values within the bounds to be considered a true positive (Default: shown below).
    max_area: 100000
    # OPTIONAL: the min ratio of width/height of bounding box for valid object detection (default: shown below).
    min_ratio: 0
     # OPTIONAL: the max ratio of width/height of bounding box for valid object detection (default: shown below).
    max_ratio: 24000000
    
cameras:
  # REQUIRED: Name of the camera
  greatroom_cam:
    # OPTIONAL: Frequency in seconds to run detection on the camera.
    # a value of 0 disables auto detection (Default: shown below).
    auto_detect: 30
    # OPTIONAL: Configure the url and retention of snapshots. (Default: Shown Below)
    snapshot_config:
        # OPTIONAL: but highly recommended, setting the default url for a snapshot to be
        # processed by this camera. This is required for auto detection (Default: none).
        url: "http://192.168.0.5:5000/snapshot/dog-cam.jpg"
        # OPTIONAL: Whether or not to draw bounding boxes for confirmed objects in the snapshots (Default: shown below).
        bounding_box: true
        # OPTIONAL: Whether or not to save a clean png of the snapshot along with the annotated jpg (Default: shown below).
        clean_snapshot: true
        # OPTIONAL: Whether or not to save the snapshots of confirmed detections (Default: shown below).
        save_detections: true
        # OPTIONAL: Whether or not to save the snapshots of missed detections (Default: shown below).
        save_misses: false
        # OPTIONAL: Variations of snapshots to keep. Options are all, mask, crop (Default: shown below).
        mode: "all"
        # OPTIONAL: Number of days of snapshots to keep (Default: shown below).
        retain_days: 7
    # REQUIRED: Zones are cropped areas where the object can be expected to be.
    # This makes searching / matches for efficient and more predictable than searching
    # the entire image.
    zones:
      # REQUIRED: Name of the zone.
      livingroom:
        # REQUIRED: Coordinates to crop the zone by.
        # NOTE: The order of the coordinates are: x, y, x+w, y+h starting in the top left corner as 0, 0.
        coordinates: 1000, 0, 1200, 125
        # REQUIRED: List of objects that may be in this zone. These correspond to
        # the objects list defined previously and are matched by name.
        objects:
          - tube_light

Relevant log output

N/A

Any other information that may be helpful

No response

Interesting, so this is happening when trying to install the addon?

Okay if you try again it should now pull down (will likely need to "update" the addon first)

Yes, it did pull down and install...but now it won't run. Logs are outputting the following error.

[FATAL tini (7)] exec python3 failed: Exec format error

So, I uninstalled swatch again. I've deleted all of the swatch data (addon folder and the swatch config). I reinstalled the addon.

It still throws the same error. Not sure what's going on.

Yes, unfortunately I am trying to see if I can reproduce but running it on my end with the addon it is installing and working as expected. Just wanting to confirm you do have swatch.yml inside of /config correct?

Yeah, swatch.yml is right where it is supposed to be next to configuration.yaml.

I'll be honest I've got no idea what is going on either. I am able to fire up an image that sort of works in portainer when I pull the image from dockerhub (camera feed and zone show up, but not so much with the color picker and object detection). So...the issue seems like it must with HA somewhere?

What device / architecture are you running on?

Running a supervised installation using Debain Bullseye 64bit. Old i7 dell laptop.

edit: Yup....I see why you asked that. I was poking around at the images and it looks like HA is pulling the arm64 build not the amd64 build. That would do it.

Can't get HA to pull a 64 bit image, not sure what's going on there.

Can't get HA to pull a 64 bit image, not sure what's going on there.

Oh I see, that might be a good clue

Please try again, I believe this should be resolved now

It is resolved thanks so much.