cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
608 stars 199 forks source link

Changing the item's class #161

Open evgevd opened 6 years ago

evgevd commented 6 years ago

from to

I use Sloth in correcting a predicted labels for following using corrected labels in training. Prediction model is underlearned so I often ought to change the item's classes. Is it possible to change the class without deleting an exciting rectangle?

evgevd commented 6 years ago

Solved (I guess): I added code to keyPressEvent in annotationscene.py:

`            if event.key() == Qt.Key_Y:
                if  self.selectedItems()[-1]._model_item._dict['class']=='s':
                    self.selectedItems()[-1]._model_item._dict['class']='m'
                    self.selectedItems()[-1].setColor(Qt.red)
                elif self.selectedItems()[-1]._model_item._dict['class']=='m':
                    self.selectedItems()[-1]._model_item._dict['class']='s'
                    self.selectedItems()[-1].setColor(Qt.green)`