[wip] not prooperly working
This commit is contained in:
parent
3bc938cda7
commit
461f3aadfe
@ -38,6 +38,8 @@ class TrackingData(QObject):
|
||||
return self._data["track"].shape[0]
|
||||
|
||||
def _find(self, ids):
|
||||
if len(ids) < 1:
|
||||
return np.array([])
|
||||
ids = np.sort(ids)
|
||||
indexes = np.ones_like(ids, dtype=int) * -1
|
||||
j = 0
|
||||
@ -75,8 +77,10 @@ class TrackingData(QObject):
|
||||
ids : array-like
|
||||
An array-like object containing the IDs to be set as user selections.
|
||||
"""
|
||||
print(ids)
|
||||
self._selection = self._find(ids)
|
||||
self._selected_ids = ids
|
||||
print(self._selection, self._selected_ids)
|
||||
|
||||
def setTrack(self, track_id:int, setUserLabeled:bool=True)-> None:
|
||||
"""Assign a new track_id to the user-selected detections
|
||||
@ -88,7 +92,8 @@ class TrackingData(QObject):
|
||||
setUserLabeled : bool
|
||||
Should the "userlabeled" state of the detections be set to True? Otherwise they will be left untouched.
|
||||
"""
|
||||
self["track"][self._user_selections] = track_id
|
||||
print(self._selection)
|
||||
self["track"][self._selection] = track_id
|
||||
if setUserLabeled:
|
||||
self.setUserLabeledStatus(True, True)
|
||||
|
||||
|
@ -136,7 +136,8 @@ class DetectionView(QWidget):
|
||||
coordinates = self._data.coordinates(selection=True)
|
||||
centercoordinates = self._data.centerOfGravity(selection=True)
|
||||
userlabeled = self._data.selectedData("userlabeled")
|
||||
indices = self._data.selectedData("index")
|
||||
|
||||
indices = self._data.selectionIndices
|
||||
image_rect = self._pixmapitem.boundingRect() if self._pixmapitem is not None else QRectF(0,0,0,0)
|
||||
|
||||
for i, idx in enumerate(indices):
|
||||
|
@ -307,6 +307,7 @@ class FixTracks(QWidget):
|
||||
|
||||
def on_detectionsSelected(self, detections):
|
||||
logging.debug("Tracks: Detections selected")
|
||||
print(detections)
|
||||
tracks = np.zeros(len(detections), dtype=int)
|
||||
ids = np.zeros_like(tracks)
|
||||
frames = np.zeros_like(tracks)
|
||||
|
Loading…
Reference in New Issue
Block a user