py-feat
py-feat copied to clipboard
Interactive plotly backend
@ljchang Here's another fresh PR that specifically isolates out the new interactive plot_detections method you added. It does not include the live demo plotting code. We can prepare a separate PR for that functionality.
As discussed I've renamed your method it to iplot_detections and kept the old plot_detections for backwards compatibility. Few things:
- There looks like there's an issue with
plot_multipleframes_detectionsif images are different sizes. Any quick thoughts to fix this? You can reproduce it using the following code:
from feat.utils.io import get_test_data_path
from feat import Detector
detector = Detector(verbose=False)
multi_face = os.path.join(get_test_data_path(), "multi_face.jpg")
single_face = os.path.join(get_test_data_path(), "single_face.jpg")
out_combined = detector.detect_image([single_face, multi_face])
out_combined.iplot_detections()
- Here are the additional features I'm going to try to get working based on your other PR https://github.com/cosanlab/py-feat/pull/178:
- [ ] Explore tooltip functionality
- [ ] add adjustment buttons for playback speed in plot_multipleframes_detections
- [ ] Add smoke tests
- Here are feature that seem like they're for the live demo plotting feature which isn't part of this PR so I won't work on here. But correct me if I'm wrong:
- [ ] streamline muscle au dictionary
- [ ] add examples for saving plots and videos
- [ ] allow multiple detectors to be toggled in plot_singleframe_detections()
- [ ] ideally, both types of interactivity would be combined into a single plot
- [ ] add new function to plot faces from AUs (the other main way to generate plots in py-feat)