|
20 | 20 | from utils.configloader import RESOLUTION, FRAMERATE, OUT_DIR, MODEL_NAME, MULTI_CAM, STACK_FRAMES, \ |
21 | 21 | ANIMALS_NUMBER, STREAMS, STREAMING_SOURCE |
22 | 22 | from utils.poser import load_deeplabcut, get_pose, find_local_peaks_new, calculate_skeletons,\ |
23 | | - get_ma_pose, calculate_ma_skeletons, calculate_skeletons_dlc_live |
| 23 | + get_ma_pose, calculate_ma_skeletons, calculate_skeletons_dlc_live, transform_2skeleton |
24 | 24 | from utils.plotter import plot_bodyparts, plot_metadata_frame |
25 | 25 |
|
26 | 26 |
|
@@ -284,7 +284,9 @@ def get_pose_mp(input_q, output_q): |
284 | 284 | index, frame = input_q.get() |
285 | 285 | if MODEL_ORIGIN == 'DLC': |
286 | 286 | scmap, locref, pose = get_pose(frame, config, sess, inputs, outputs) |
287 | | - peaks = find_local_peaks_new(scmap, locref, ANIMALS_NUMBER, config) |
| 287 | + # TODO: REmove alterations to original |
| 288 | + #peaks = find_local_peaks_new(scmap, locref, ANIMALS_NUMBER, config) |
| 289 | + peaks = pose |
288 | 290 | if MODEL_ORIGIN == 'MADLC': |
289 | 291 | peaks = get_ma_pose(frame, config, sess, inputs, outputs) |
290 | 292 |
|
@@ -407,7 +409,9 @@ def get_analysed_frames(self) -> tuple: |
407 | 409 |
|
408 | 410 | # Getting the analysed data |
409 | 411 | analysed_index, peaks = self._multiprocessing[camera]['output'].get() |
410 | | - skeletons = calculate_skeletons(peaks, ANIMALS_NUMBER) |
| 412 | + #TODO: REMOVE IF USELESS |
| 413 | + skeletons = [transform_2skeleton(peaks)] |
| 414 | + #skeletons = calculate_skeletons(peaks, ANIMALS_NUMBER) |
411 | 415 | print('', end='\r', flush=True) # this is the line you should not remove |
412 | 416 | analysed_frame, depth_map, input_time = self.get_stored_frames(camera) |
413 | 417 | analysis_time = time.time() - input_time |
|
0 commit comments