GUI API¶
Main Window¶
body_eye_sync.gui.main_window
¶
The main window: the File menu, and the tabs an experiment is worked through.
MainWindow
¶
Bases: QMainWindow
Source code in src/body_eye_sync/gui/main_window.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
Tabs¶
body_eye_sync.gui.tabs
¶
The tabs the main window is made of, in the order they are shown.
Each tab is one stage of working with an experiment, and each lives in its own
module. Adding a stage means writing a :class:~body_eye_sync.gui.tabs.base.BaseTab
subclass and listing it in :data:TAB_TYPES; the window needs no changes.
AlignmentTab
¶
Bases: BaseTab
Let the user align all kind of inputs in time with each other via setting their time_offset properties.
Source code in src/body_eye_sync/gui/tabs/alignment.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
refresh()
¶
Render every video input, with at most three videos per row.
Source code in src/body_eye_sync/gui/tabs/alignment.py
AudioProcessingTab
¶
Bases: BaseTab
Show one input's speech results and transcribe its audio.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |
input()
¶
The input being shown, or None if the experiment has none.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
is_busy()
¶
refresh()
¶
Re-list the inputs, keeping the shown one if it is still there.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
speech()
¶
The shown input's speech results, whichever kind of input it is.
BaseTab
¶
Bases: QWidget
One tab of the main window, acting on an :class:Experiment.
Source code in src/body_eye_sync/gui/tabs/base.py
refresh()
¶
shutdown()
¶
Stop any work in progress; called when the window is closing.
Source code in src/body_eye_sync/gui/tabs/base.py
ClockRateTab
¶
Bases: BaseTab
Recalculate and apply each input's offset and clock rate.
Source code in src/body_eye_sync/gui/tabs/clock_rate.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
DataExportTab
¶
Bases: BaseTab
Choose experiment inputs and export their synchronized video grid.
Source code in src/body_eye_sync/gui/tabs/data_export.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
selected_video_ids()
¶
InputFilesTab
¶
Bases: BaseTab
Name the experiment, and add, remove and edit its input files.
Source code in src/body_eye_sync/gui/tabs/input_files.py
add_audio(paths)
¶
add_fixed_videos(paths)
¶
Add each path as a fixed video input, ids taken from the filenames.
add_glasses_videos(paths)
¶
Add each path as a glasses video input, ids taken from the filenames.
refresh()
¶
remove_inputs(inputs)
¶
Remove inputs from the experiment, reporting any that cannot go.
selected_inputs()
¶
The selected inputs; at most one section has a selection at a time.
PlaceholderTab
¶
Bases: BaseTab
A temporary tab for yet to be implemented tabs.
Source code in src/body_eye_sync/gui/tabs/base.py
PostProcessingTab
¶
Bases: PlaceholderTab
Combine the per-input results into experiment-level results.
Source code in src/body_eye_sync/gui/tabs/post_processing.py
SpeechPostProcessingTab
¶
Bases: BaseTab
Work out the experiment's speech turns from its glasses recordings.
Source code in src/body_eye_sync/gui/tabs/speech_post_processing.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
blocked_reason()
¶
Why attribution cannot run yet, or None when it can.
Source code in src/body_eye_sync/gui/tabs/speech_post_processing.py
VideoProcessingTab
¶
Bases: BaseTab
Show one of the experiment's videos and run its pipeline over it.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
is_busy()
¶
refresh()
¶
Re-list the experiment's videos, keeping the shown one if it is still there.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
video()
¶
The video input being shown, or None if the experiment has none.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
body_eye_sync.gui.tabs.base
¶
Common base class for tabs.
The main window owns the experiment, and passes the experiment to a tab using
:meth:BaseTab.set_experiment, and calls :meth:BaseTab.refresh when the experiment is changed elsewhere.
Tabs report changes to the experiment via signals.
BaseTab
¶
Bases: QWidget
One tab of the main window, acting on an :class:Experiment.
Source code in src/body_eye_sync/gui/tabs/base.py
refresh()
¶
shutdown()
¶
Stop any work in progress; called when the window is closing.
Source code in src/body_eye_sync/gui/tabs/base.py
PlaceholderTab
¶
Bases: BaseTab
A temporary tab for yet to be implemented tabs.
Source code in src/body_eye_sync/gui/tabs/base.py
body_eye_sync.gui.tabs.input_files
¶
Input files tab: the input video and audio files for the experiment.
InputFilesTab
¶
Bases: BaseTab
Name the experiment, and add, remove and edit its input files.
Source code in src/body_eye_sync/gui/tabs/input_files.py
add_audio(paths)
¶
add_fixed_videos(paths)
¶
Add each path as a fixed video input, ids taken from the filenames.
add_glasses_videos(paths)
¶
Add each path as a glasses video input, ids taken from the filenames.
refresh()
¶
remove_inputs(inputs)
¶
Remove inputs from the experiment, reporting any that cannot go.
selected_inputs()
¶
The selected inputs; at most one section has a selection at a time.
gaze_file_for(section, video)
¶
The gaze file to record a glasses video with: found beside it, or chosen.
Devices export the gaze samples next to the video, so that is looked for first and the user is only asked when it is not obvious.
Source code in src/body_eye_sync/gui/tabs/input_files.py
body_eye_sync.gui.tabs.alignment
¶
Alignment tab: placing each input on the shared experiment timeline.
AlignmentTab
¶
Bases: BaseTab
Let the user align all kind of inputs in time with each other via setting their time_offset properties.
Source code in src/body_eye_sync/gui/tabs/alignment.py
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | |
refresh()
¶
Render every video input, with at most three videos per row.
Source code in src/body_eye_sync/gui/tabs/alignment.py
body_eye_sync.gui.tabs.clock_rate
¶
Clock rate tab: measure each input's clock rate against the others.
ClockRateTab
¶
Bases: BaseTab
Recalculate and apply each input's offset and clock rate.
Source code in src/body_eye_sync/gui/tabs/clock_rate.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | |
body_eye_sync.gui.tabs.video_processing
¶
Video processing tab: run the pipeline over one video input and watch it.
One video input is shown at a time, chosen from the experiment's video inputs. The pipeline editor beside the viewer edits the pipeline block belonging to that input's type, and its "Run" buttons run the steps in a background thread, with the results drawn over the video as they arrive.
VideoProcessingTab
¶
Bases: BaseTab
Show one of the experiment's videos and run its pipeline over it.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | |
is_busy()
¶
refresh()
¶
Re-list the experiment's videos, keeping the shown one if it is still there.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
video()
¶
The video input being shown, or None if the experiment has none.
Source code in src/body_eye_sync/gui/tabs/video_processing.py
body_eye_sync.gui.tabs.audio_processing
¶
Audio processing tab: transcribe the speech from an input's audio.
AudioProcessingTab
¶
Bases: BaseTab
Show one input's speech results and transcribe its audio.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | |
input()
¶
The input being shown, or None if the experiment has none.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
is_busy()
¶
refresh()
¶
Re-list the inputs, keeping the shown one if it is still there.
Source code in src/body_eye_sync/gui/tabs/audio_processing.py
speech()
¶
The shown input's speech results, whichever kind of input it is.
body_eye_sync.gui.tabs.speech_post_processing
¶
Speech post processing tab: who spoke when, across the whole experiment.
SpeechPostProcessingTab
¶
Bases: BaseTab
Work out the experiment's speech turns from its glasses recordings.
Source code in src/body_eye_sync/gui/tabs/speech_post_processing.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | |
blocked_reason()
¶
Why attribution cannot run yet, or None when it can.
Source code in src/body_eye_sync/gui/tabs/speech_post_processing.py
body_eye_sync.gui.tabs.post_processing
¶
Post processing tab: what is derived from the per-input pipeline results.
PostProcessingTab
¶
Bases: PlaceholderTab
Combine the per-input results into experiment-level results.
Source code in src/body_eye_sync/gui/tabs/post_processing.py
body_eye_sync.gui.tabs.data_export
¶
Data export tab: write a synchronized combined video.
DataExportTab
¶
Bases: BaseTab
Choose experiment inputs and export their synchronized video grid.
Source code in src/body_eye_sync/gui/tabs/data_export.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | |
selected_video_ids()
¶
Widgets¶
body_eye_sync.gui.widgets
¶
AudioPlaybackWidget
¶
Bases: QWidget
Play an audio-bearing file, seek it, and display its loudness.
Source code in src/body_eye_sync/gui/widgets/audio_playback.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | |
clear()
¶
Stop playback and forget the currently loaded recording.
Source code in src/body_eye_sync/gui/widgets/audio_playback.py
load(path, levels=None)
¶
Load an audio file or the audio track of a video file.
levels are the recording's loudness in dB, if not provided will be measured in a background thread.
Source code in src/body_eye_sync/gui/widgets/audio_playback.py
play()
¶
AutoHeightTable
¶
Bases: QTableWidget
A table sized to exactly fit its header and rows.
Source code in src/body_eye_sync/gui/widgets/auto_height_table.py
fit_to_rows()
¶
Make the table exactly as tall as its header and rows.
Source code in src/body_eye_sync/gui/widgets/auto_height_table.py
PipelineEditor
¶
Bases: QWidget
Edit one pipeline's steps and their arguments.
steps says which steps the editor shows, in run order -- :data:VIDEO_STEPS
or :data:SPEECH_STEPS. Populate from a pipeline with :meth:set_from (or
:meth:reset to defaults), and write the edited values back into one with
:meth:apply_to. changed fires on any toggle or field edit. Each step has
its own "Run" button (run_requested, with the step's type);
run_all_requested fires from the button that runs every enabled step in
order. Running is out of scope for this widget -- it only reports the
requests, and its buttons' enabled state is driven from outside via
:meth:set_run_enabled/:meth:set_run_all_enabled.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
apply_to(pipeline)
¶
Write the edited steps back onto pipeline's stage fields.
Disabled optional steps become None. All steps are validated before
anything is assigned, so an invalid field leaves pipeline intact.
Raises :class:pydantic.ValidationError / :class:ValueError if any
step's arguments are invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
config_for(step_type)
¶
The validated config for one step, whether or not it is enabled.
Lets an interactive run of a single pass use the arguments the user has
set, independent of whether the step is toggled into the saved pipeline.
Raises :class:pydantic.ValidationError / :class:ValueError if invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
enabled_steps()
¶
The enabled steps, in order, built and validated from the widgets.
Raises :class:pydantic.ValidationError / :class:ValueError if any
enabled step's arguments are invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
reset()
¶
Reset every step to its defaults, optional steps switched off.
set_from(pipeline)
¶
Populate the editor from pipeline's stages (no changed).
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
set_run_enabled(step_type, enabled)
¶
Enable/disable one step's "Run" button (e.g. while its inputs aren't ready).
PydanticForm
¶
Bases: QWidget
An editing form for one flat pydantic model instance.
Populate from a model with :meth:from_model, read the edited values back
(validated) with :meth:to_model. changed fires on any edit.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
from_model(model)
¶
Populate the widgets from model's current values.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
to_model(base=None)
¶
Build a validated model from the current widget values.
When this form displays only selected fields, base preserves the
other values instead of resetting them to their defaults.
Raises :class:pydantic.ValidationError (or :class:ValueError from
list parsing) if the edited values are invalid.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
SynchronizedAudioPlaybackWidget
¶
Bases: QWidget
Stack aligned recordings and play accepted speech turns on one clock.
Source code in src/body_eye_sync/gui/widgets/synchronized_audio_playback.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | |
color_for(recording_id)
¶
Return the stable display color assigned to recording_id.
Source code in src/body_eye_sync/gui/widgets/synchronized_audio_playback.py
load(recordings)
¶
Show recordings on their shared experiment clock.
Source code in src/body_eye_sync/gui/widgets/synchronized_audio_playback.py
play()
¶
Start or resume all recordings from the shared position.
Source code in src/body_eye_sync/gui/widgets/synchronized_audio_playback.py
seek(seconds)
¶
Move every recording to one experiment-clock position.
Source code in src/body_eye_sync/gui/widgets/synchronized_audio_playback.py
set_turns(turns)
¶
Set the accepted turns identifying the contributing recordings.
VideoViewer
¶
Bases: QWidget
Display a video with play/pause, a seek slider and a frame spinbox.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | |
current_media_time_seconds
property
¶
Timestamp of the displayed video frame in the source media.
playback_time_seconds
property
¶
Exact source-media time represented by the playback clock.
video
property
¶
The video being displayed, or None if there is none.
clear()
¶
Show nothing at all: no video, no frame and no overlays.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
enable_controls(enable)
¶
Enable or disable the playback, mute and seek controls.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
load(video)
¶
Display video, showing its first frame and its boxes (if any).
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
refresh_overlays()
¶
Redraw the current frame's person boxes and any detected faces.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
set_frame(index, *, displayed_time_seconds=None, sync_audio=True)
¶
Display frame index and optionally seek embedded audio to it.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
set_time_seconds(seconds, *, allow_negative=False, show_requested_time=False, sync_audio=True)
¶
Display the frame selected by seconds in the source video.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_face_frame(result)
¶
Display a freshly face-detected frame, with person boxes and faces.
Connected to the face-detection worker's per-frame signal; result is
a :class:FaceFrameResult with 0-based indexing. The person boxes come
from the already-tracked video, the faces straight from the result.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_frame(frame)
¶
Display a freshly tracked frame and draw its boxes directly.
Connected to the object tracking worker's per-frame signal; frame is
a BoxMOT per-frame result with 1-based indexing.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_pose_frame(result)
¶
Display a freshly pose-detected frame, with person boxes and poses.
Connected to the body-pose worker's per-frame signal; result is a
:class:PoseFrameResult with 0-based indexing. The person boxes come
from the already-tracked video, the poses straight from the result.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
body_eye_sync.gui.widgets.pipeline_editor
¶
Editor for an experiment's pipeline: which steps run, and their arguments.
The pipeline structure is hard-coded here -- the known steps and their order,
one list per kind of pipeline -- while each step's arguments are edited by an
auto-generated :class:PydanticForm. Every pipeline has a mandatory base pass
that the rest build on; those later passes are optional and toggled on/off.
This widget concerns itself only with the pipeline; managing the experiment's inputs (videos, gaze data, ...) is a separate interface.
PipelineEditor
¶
Bases: QWidget
Edit one pipeline's steps and their arguments.
steps says which steps the editor shows, in run order -- :data:VIDEO_STEPS
or :data:SPEECH_STEPS. Populate from a pipeline with :meth:set_from (or
:meth:reset to defaults), and write the edited values back into one with
:meth:apply_to. changed fires on any toggle or field edit. Each step has
its own "Run" button (run_requested, with the step's type);
run_all_requested fires from the button that runs every enabled step in
order. Running is out of scope for this widget -- it only reports the
requests, and its buttons' enabled state is driven from outside via
:meth:set_run_enabled/:meth:set_run_all_enabled.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
apply_to(pipeline)
¶
Write the edited steps back onto pipeline's stage fields.
Disabled optional steps become None. All steps are validated before
anything is assigned, so an invalid field leaves pipeline intact.
Raises :class:pydantic.ValidationError / :class:ValueError if any
step's arguments are invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
config_for(step_type)
¶
The validated config for one step, whether or not it is enabled.
Lets an interactive run of a single pass use the arguments the user has
set, independent of whether the step is toggled into the saved pipeline.
Raises :class:pydantic.ValidationError / :class:ValueError if invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
enabled_steps()
¶
The enabled steps, in order, built and validated from the widgets.
Raises :class:pydantic.ValidationError / :class:ValueError if any
enabled step's arguments are invalid.
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
reset()
¶
Reset every step to its defaults, optional steps switched off.
set_from(pipeline)
¶
Populate the editor from pipeline's stages (no changed).
Source code in src/body_eye_sync/gui/widgets/pipeline_editor.py
set_run_enabled(step_type, enabled)
¶
Enable/disable one step's "Run" button (e.g. while its inputs aren't ready).
body_eye_sync.gui.widgets.video_viewer
¶
A Qt widget that plays a video with frame-accurate seeking, and displays boxes
VideoViewer
¶
Bases: QWidget
Display a video with play/pause, a seek slider and a frame spinbox.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | |
current_media_time_seconds
property
¶
Timestamp of the displayed video frame in the source media.
playback_time_seconds
property
¶
Exact source-media time represented by the playback clock.
video
property
¶
The video being displayed, or None if there is none.
clear()
¶
Show nothing at all: no video, no frame and no overlays.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
enable_controls(enable)
¶
Enable or disable the playback, mute and seek controls.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
load(video)
¶
Display video, showing its first frame and its boxes (if any).
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
refresh_overlays()
¶
Redraw the current frame's person boxes and any detected faces.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
set_frame(index, *, displayed_time_seconds=None, sync_audio=True)
¶
Display frame index and optionally seek embedded audio to it.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
set_time_seconds(seconds, *, allow_negative=False, show_requested_time=False, sync_audio=True)
¶
Display the frame selected by seconds in the source video.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_face_frame(result)
¶
Display a freshly face-detected frame, with person boxes and faces.
Connected to the face-detection worker's per-frame signal; result is
a :class:FaceFrameResult with 0-based indexing. The person boxes come
from the already-tracked video, the faces straight from the result.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_frame(frame)
¶
Display a freshly tracked frame and draw its boxes directly.
Connected to the object tracking worker's per-frame signal; frame is
a BoxMOT per-frame result with 1-based indexing.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
show_live_pose_frame(result)
¶
Display a freshly pose-detected frame, with person boxes and poses.
Connected to the body-pose worker's per-frame signal; result is a
:class:PoseFrameResult with 0-based indexing. The person boxes come
from the already-tracked video, the poses straight from the result.
Source code in src/body_eye_sync/gui/widgets/video_viewer.py
body_eye_sync.gui.widgets.pydantic_form
¶
Auto-generate an editing form for a flat pydantic model.
:class:PydanticForm builds one input widget per model field from the field's
type, constraints and metadata, so the pydantic schema stays the single source
of truth for both serialisation and the GUI. It supports the scalar field types
the pipeline step models use (str, int, float, bool, a
list of scalars) plus choices metadata; it is not a general recursive
form and does not descend into nested models.
Widget mapping:
choicesinjson_schema_extra-> editable :class:QComboBoxbool-> :class:QCheckBoxint(withge/lebounds) -> :class:QSpinBoxfloat(withge/lebounds)-> :class:QDoubleSpinBoxlist[...]-> :class:QLineEdit(comma separated)- anything else /
str-> :class:QLineEdit
Literal fields (the discriminator tags) are fixed and not shown. A field
whose type allows None is shown as an empty line edit and reads back as
None, so an optional setting can be left unset.
PydanticForm
¶
Bases: QWidget
An editing form for one flat pydantic model instance.
Populate from a model with :meth:from_model, read the edited values back
(validated) with :meth:to_model. changed fires on any edit.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |
from_model(model)
¶
Populate the widgets from model's current values.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
to_model(base=None)
¶
Build a validated model from the current widget values.
When this form displays only selected fields, base preserves the
other values instead of resetting them to their defaults.
Raises :class:pydantic.ValidationError (or :class:ValueError from
list parsing) if the edited values are invalid.
Source code in src/body_eye_sync/gui/widgets/pydantic_form.py
body_eye_sync.gui.widgets.auto_height_table
¶
A table that grows with its rows instead of scrolling inside itself.
AutoHeightTable
¶
Bases: QTableWidget
A table sized to exactly fit its header and rows.
Source code in src/body_eye_sync/gui/widgets/auto_height_table.py
fit_to_rows()
¶
Make the table exactly as tall as its header and rows.
Source code in src/body_eye_sync/gui/widgets/auto_height_table.py
Workers¶
body_eye_sync.gui.workers
¶
The background workers that run a pipeline step off the GUI thread.
One worker per step, each a :class:~body_eye_sync.gui.workers.base.BaseWorker
subclass that reports its progress with signals and writes its results into the
:class:~body_eye_sync.experiment.video.Video or
:class:~body_eye_sync.experiment.speech.Speech it was given.
BaseWorker
¶
Bases: QObject
Runs one pipeline step off the GUI thread, into the results it computes.
target is what the step writes into: a
:class:~body_eye_sync.experiment.video.Video for the video stages, a
:class:~body_eye_sync.experiment.speech.Speech for the speech ones.
Subclasses supply the per-run work: :meth:_items yields each computed
frame/result, :meth:_accumulate stores one into the target, :meth:_finalise
folds the accumulated results once the run completes, and :meth:_discard
rolls the target back if the run is cancelled or fails. Each item is emitted
via new_frame so the GUI can show it live, and a step that can say how far
through it is reports that as a fraction via progress; finished (after
:meth:_finalise) or cancelled (after :meth:_discard) fires once the
run ends, and any exception is reported via failed with a traceback (also
after :meth:_discard). operation_name labels the run for the GUI.
Source code in src/body_eye_sync/gui/workers/base.py
BodyPoseWorker
¶
Bases: BaseWorker
Runs :func:detect_body_poses off the GUI thread, into a :class:Video.
Body poses are detected inside the person boxes already tracked into the
:class:Video. Each frame's poses are accumulated and emitted via
new_frame so the GUI can draw them live, then folded onto the matching
rows once the run finishes; a cancelled/failed pass keeps the tracked boxes.
The detection arguments come from step.
Source code in src/body_eye_sync/gui/workers/body_pose.py
FaceDetectionWorker
¶
Bases: BaseWorker
Runs :func:detect_faces off the GUI thread, into a :class:Video.
Faces are detected inside the person boxes already tracked into the
:class:Video. Each frame's faces are accumulated and emitted via
new_frame so the GUI can draw them live, then folded onto the matching
rows once the run finishes; a cancelled/failed pass keeps the tracked boxes.
The detection arguments come from step.
Source code in src/body_eye_sync/gui/workers/face_detection.py
ObjectTrackingWorker
¶
Bases: BaseWorker
Runs :func:detect_tracklets off the GUI thread, into a :class:Video.
Each tracked frame is appended to the :class:Video as it is computed and
emitted via new_frame so the GUI can draw it live; the results are folded
into the video once the run finishes, or discarded if it is cancelled/fails.
The tracking arguments come from step.
Source code in src/body_eye_sync/gui/workers/object_tracking.py
TranscriptionWorker
¶
Bases: BaseWorker
Runs :func:transcribe off the GUI thread, into a :class:Speech.
loudness is measured from the same audio before transcribing it, so
that speaker attribution has it without decoding the recording again.
Source code in src/body_eye_sync/gui/workers/transcription.py
body_eye_sync.gui.workers.base
¶
BaseWorker
¶
Bases: QObject
Runs one pipeline step off the GUI thread, into the results it computes.
target is what the step writes into: a
:class:~body_eye_sync.experiment.video.Video for the video stages, a
:class:~body_eye_sync.experiment.speech.Speech for the speech ones.
Subclasses supply the per-run work: :meth:_items yields each computed
frame/result, :meth:_accumulate stores one into the target, :meth:_finalise
folds the accumulated results once the run completes, and :meth:_discard
rolls the target back if the run is cancelled or fails. Each item is emitted
via new_frame so the GUI can show it live, and a step that can say how far
through it is reports that as a fraction via progress; finished (after
:meth:_finalise) or cancelled (after :meth:_discard) fires once the
run ends, and any exception is reported via failed with a traceback (also
after :meth:_discard). operation_name labels the run for the GUI.
Source code in src/body_eye_sync/gui/workers/base.py
body_eye_sync.gui.workers.object_tracking
¶
ObjectTrackingWorker
¶
Bases: BaseWorker
Runs :func:detect_tracklets off the GUI thread, into a :class:Video.
Each tracked frame is appended to the :class:Video as it is computed and
emitted via new_frame so the GUI can draw it live; the results are folded
into the video once the run finishes, or discarded if it is cancelled/fails.
The tracking arguments come from step.
Source code in src/body_eye_sync/gui/workers/object_tracking.py
body_eye_sync.gui.workers.face_detection
¶
FaceDetectionWorker
¶
Bases: BaseWorker
Runs :func:detect_faces off the GUI thread, into a :class:Video.
Faces are detected inside the person boxes already tracked into the
:class:Video. Each frame's faces are accumulated and emitted via
new_frame so the GUI can draw them live, then folded onto the matching
rows once the run finishes; a cancelled/failed pass keeps the tracked boxes.
The detection arguments come from step.
Source code in src/body_eye_sync/gui/workers/face_detection.py
body_eye_sync.gui.workers.body_pose
¶
BodyPoseWorker
¶
Bases: BaseWorker
Runs :func:detect_body_poses off the GUI thread, into a :class:Video.
Body poses are detected inside the person boxes already tracked into the
:class:Video. Each frame's poses are accumulated and emitted via
new_frame so the GUI can draw them live, then folded onto the matching
rows once the run finishes; a cancelled/failed pass keeps the tracked boxes.
The detection arguments come from step.
Source code in src/body_eye_sync/gui/workers/body_pose.py
body_eye_sync.gui.workers.transcription
¶
TranscriptionWorker
¶
Bases: BaseWorker
Runs :func:transcribe off the GUI thread, into a :class:Speech.
loudness is measured from the same audio before transcribing it, so
that speaker attribution has it without decoding the recording again.
Source code in src/body_eye_sync/gui/workers/transcription.py
Utilities¶
body_eye_sync.gui.utils
¶
body_eye_sync.gui.autoupdate
¶
Check PyPI for a newer version of body-eye-sync and offer to install it.
The latest published version and its dependencies come from the PyPI JSON API. Updates are installed from PyPI with pip.
If any deps are missing we instead point the user at the full installer.
UpdateInfo
dataclass
¶
check_for_update()
¶
Return info about a newer version if found, otherwise None.