Skip to content

Commit

Permalink
Add Label ID
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jan 11, 2024
1 parent 01fdf5d commit dd6c6b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/api/db/models/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ export class ImageModel {
return await retry(async () => {
console.log('ImageModel.createInternalLabels - creating label: ', JSON.stringify(label));

label.type = 'ml';

// find image, create label record
const image = await ImageModel.queryById(label.imageId, context);
if (isLabelDupe(image, label)) throw new DuplicateLabelError();
Expand Down Expand Up @@ -545,6 +547,8 @@ export class ImageModel {
return await retry(async () => {
console.log('ImageModel.createLabels - creating label: ', JSON.stringify(label));

label.type = 'manual';

// find image, create label record
const image = await ImageModel.queryById(label.imageId, context);
const project = await ProjectModel.queryById(image.projectId);
Expand Down
2 changes: 1 addition & 1 deletion src/api/type-defs/objects/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default `
type Label {
_id: ID!
type: String!
category: String!
labelId: String!
conf: Float
bbox: [Float!]!
labeledDate: Date!
Expand Down

0 comments on commit dd6c6b5

Please sign in to comment.