[classifier] cleanup and preparations
This commit is contained in:
parent
15cee494f6
commit
ff7e1e85ae
@ -102,18 +102,8 @@ class ClassifierWidget(QTabWidget):
|
|||||||
return self._size_classifier
|
return self._size_classifier
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
import pickle
|
|
||||||
from fixtracks.info import PACKAGE_ROOT
|
|
||||||
from PySide6.QtWidgets import QApplication
|
|
||||||
|
|
||||||
datafile = PACKAGE_ROOT / "data/merged_small.pkl"
|
|
||||||
print(datafile)
|
|
||||||
with open(datafile, "rb") as f:
|
|
||||||
df = pickle.load(f)
|
|
||||||
|
|
||||||
coords = np.stack(df.keypoints.values,).astype(np.float32)[:,:,:]
|
|
||||||
|
|
||||||
|
def test_sizeClassifier(coords):
|
||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
window = QWidget()
|
window = QWidget()
|
||||||
window.setMinimumSize(200, 200)
|
window.setMinimumSize(200, 200)
|
||||||
@ -121,14 +111,38 @@ def main():
|
|||||||
win = SizeClassifier()
|
win = SizeClassifier()
|
||||||
win.setCoordinates(coords)
|
win.setCoordinates(coords)
|
||||||
|
|
||||||
btn = QPushButton("get bounds")
|
layout.addWidget(win)
|
||||||
btn.clicked.connect(lambda: win.selections())
|
window.setLayout(layout)
|
||||||
|
window.show()
|
||||||
|
app.exec()
|
||||||
|
|
||||||
|
|
||||||
|
def test_neighborhoodClassifier(coords):
|
||||||
|
app = QApplication([])
|
||||||
|
window = QWidget()
|
||||||
|
window.setMinimumSize(200, 200)
|
||||||
|
layout = QVBoxLayout()
|
||||||
|
win = SizeClassifier()
|
||||||
|
win.setCoordinates(coords)
|
||||||
layout.addWidget(win)
|
layout.addWidget(win)
|
||||||
layout.addWidget(btn)
|
|
||||||
window.setLayout(layout)
|
window.setLayout(layout)
|
||||||
window.show()
|
window.show()
|
||||||
app.exec()
|
app.exec()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
import pickle
|
||||||
|
from fixtracks.info import PACKAGE_ROOT
|
||||||
|
from PySide6.QtWidgets import QApplication
|
||||||
|
datafile = PACKAGE_ROOT / "data/merged_small.pkl"
|
||||||
|
print(datafile)
|
||||||
|
with open(datafile, "rb") as f:
|
||||||
|
df = pickle.load(f)
|
||||||
|
|
||||||
|
coords = np.stack(df.keypoints.values,).astype(np.float32)
|
||||||
|
frames = df.frame.values
|
||||||
|
test_sizeClassifier(coords)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user