l3p-cv / lost

Label Objects and Save Time (LOST) - Design your own smart Image Annotation process in a web-based environment.
https://lost.training
MIT License
548 stars 75 forks source link

Loop is automatically sets to finished when starting the pipe #34

Closed tkwant closed 2 years ago

tkwant commented 5 years ago

Describe the bug See an example pipeline in screenshot. When I want to start this pipeline the loop gets automatically to finished and the variable self.iteration in the first script node (requestannos.py) is 9.

Expected behavior The iteration should be 0 not 9 when I start the pipeline.

Screenshots pipeline_defekt_2

Desktop (please complete the following information):

tkwant commented 5 years ago

Pipeline definition file:

{
    "description": "This pipeline selects all images of a datasource and requests annotations.",
    "author": "Tobias Kwant",
    "pipe-schema-version" : 0.0,
    "elements": [{
        "peN": 0,
        "peOut": [1],
        "datasource": {
          "type": "rawFile"
        }
      },
      {
        "peN": 1,
        "peOut": [2],
        "script": {
          "path": "requestAnnos.py",
          "description": "Request annotations for all images in a folder"
        }
      },
      {
        "peN": 2,
        "peOut": [3, 6],
        "annoTask": {
          "name": "Single Image Annotation Task",
          "type": "sia",
          "instructions": "Please draw bounding boxes for all objects in image.",
          "configuration": {
            "tools": {
              "point": false,
              "line": false,
              "polygon": true,
              "bbox": false
            },
            "actions": {
              "drawing": true,
              "labeling": true,
              "edit": {
                "label": true,
                "bounds": true,
                "delete": true
              }
            }
          }
        }
      },
      {
        "peN": 3,
        "peOut": [4,7],
        "script": {
          "path": "training.py",
          "description": "Train labeled images"
        }
      },
      {
        "peN": 4,
        "peOut": [7],
        "script": {
          "path": "evalGT.py",
          "description": "Test Ground Trouth"
        }
      },
      {
        "peN": 5,
        "peOut": null,
        "loop": {
          "maxIteration": 10,
          "peJumpId": 1
        }
      },
      {
        "peN": 6,
        "peOut": [7],
        "script": {
          "path": "export_csv.py",
          "description": "Export all annotations to a csv file."
        }
      },
      {
        "peN": 7,
        "peOut": [5],
        "dataExport": {}
      }
    ]
  }

Reordering the elements (pen and peout) solved the problem. This is the pipeline definition file, which works for me:

{
    "description": "This pipeline selects all images of a datasource and requests annotations.",
    "author": "Tobias Kwant",
    "pipe-schema-version" : 0.0,
    "elements": [{
        "peN": 0,
        "peOut": [1],
        "datasource": {
          "type": "rawFile"
        }
      },
      {
        "peN": 1,
        "peOut": [2],
        "script": {
          "path": "requestAnnos.py",
          "description": "Request annotations for all images in a folder"
        }
      },
      {
        "peN": 2,
        "peOut": [3, 5],
        "annoTask": {
          "name": "Single Image Annotation Task",
          "type": "sia",
          "instructions": "Please draw bounding boxes for all objects in image.",
          "configuration": {
            "tools": {
              "point": false,
              "line": false,
              "polygon": true,
              "bbox": false
            },
            "actions": {
              "drawing": true,
              "labeling": true,
              "edit": {
                "label": true,
                "bounds": true,
                "delete": true
              }
            }
          }
        }
      },
      {
        "peN": 3,
        "peOut": [4,6],
        "script": {
          "path": "training.py",
          "description": "Train labeled images"
        }
      },
      {
        "peN": 4,
        "peOut": [6],
        "script": {
          "path": "evalGT.py",
          "description": "Test Ground Trouth"
        }
      },
      {
        "peN": 5,
        "peOut": [6],
        "script": {
          "path": "export_csv.py",
          "description": "Export all annotations to a csv file."
        }
      },
      {
        "peN": 6,
        "peOut": [7],
        "dataExport": {}
      },
      {
        "peN": 7,
        "peOut": null,
        "loop": {
          "maxIteration": 10,
          "peJumpId": 1
        }
      }
    ]
  }
gereonreus commented 4 years ago

Is the screenshot shown the actual representation of the pipeline ? If the view is correct, the error is probably in the Pipeline Engine, because the view of a running pipeline is always derived from the current database model.

gereonreus commented 2 years ago

Closed due to inactivity.