mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
728 B
43 lines
728 B
export class BoundingBoxItem {
|
|
constructor(
|
|
public id: number,
|
|
public uuid: string,
|
|
public label: number,
|
|
public x: number,
|
|
public y: number,
|
|
public width: number,
|
|
public height: number
|
|
) {}
|
|
|
|
static valueOf({
|
|
id,
|
|
uuid,
|
|
label,
|
|
x,
|
|
y,
|
|
width,
|
|
height
|
|
}: {
|
|
id: number
|
|
uuid: string
|
|
label: number
|
|
x: number
|
|
y: number
|
|
width: number
|
|
height: number
|
|
}): BoundingBoxItem {
|
|
return new BoundingBoxItem(id, uuid, label, x, y, width, height)
|
|
}
|
|
|
|
toObject(): Object {
|
|
return {
|
|
id: this.id,
|
|
uuid: this.uuid,
|
|
label: this.label,
|
|
x: this.x,
|
|
y: this.y,
|
|
width: this.width,
|
|
height: this.height
|
|
}
|
|
}
|
|
}
|