Closed GergelyTuri closed 11 months ago
Dear @GergelyTuri,
Thank you for your interest in DeepOF! I wasn't aware of this issue. I'll investigate and check whether we can easily patch it in a future version! In the meantime, I would unfortunately advise you to test this locally if possible. Running the first cells in the tutorials on an isolated environment in your local machine should pretty much replicate what we have on colab (although I know it's a bit more tedious...).
Best, and I'll let you know once we have news in this regard! Lucas
Hey @lucasmiranda42 , Thanks for the feedback. I looked into this a little bit. This is pretty rough around the edges, but something like this could work in a Colab notebook:
!pip install ipympl
!curl -o logo.png https://colab.research.google.com/img/colab_favicon_256px.png
import ipywidgets as widgets
import matplotlib.pyplot as plt
from google.colab import output
output.enable_custom_widget_manager()
%matplotlib ipympl
click_coordinates = []
def onclick(event):
ix, iy = event.xdata, event.ydata
print(ix, iy)
click_coordinates.append(((ix,iy)))
image_path = "./logo.png"
image = plt.imread(image_path)
figure = plt.figure(figsize=(6, 6))
plt.imshow(image)
plt.axis('off') # Turn off axis for better visualization
plt.gca().get_xaxis().set_visible(False)
plt.gca().get_yaxis().set_visible(False)
cid = figure.canvas.mpl_connect('button_press_event', onclick)
Dear @GergelyTuri,
Thank you very much! I'll have a look and assess whether we can include this in the next release (which should come out around the second half of September). Feel free to submit a pull request to the development branch, so your contribution is properly credited!
Best, Lucas
Dear @GergelyTuri,
We put some effort in this regard, but it was unfortunately not as easy as we thought. The main issue seems to be that colab waits for the executed code to finish running before rendering the interactive output, which prevents us from capturing feedback and incorporating it into the project (which is the main goal of the GUI). So, for the time being, interactive arena detection will unfortunately remain a local-only feature.
That said, if you'd like to further explore and suggest or contribute solutions, these are really welcome! I do think it would be a nice thing to have.
Best, and thanks again for your interest, Lucas
Hi Lucas, Thanks for giving it a try. Best, Gergely
Hi, i am testing this package on an of video of mine in a Google Colab notebook. I am following the instructions described in Formatting your data: feature extraction from DLC output. It seems that the tutorial data works fine but my arena is rectangular so i would need to annotate it. I passed in
arena="polygonal-manual"
argument in thedeepof.data.Project
function, but when i try to runmy_deepof_project.create(force=True)
it throws the following error:I tried to replace and modify the
cv2.imshow
calls tocv2_imshow
in the source but this function works slightly differently than the original open CV one so i run into more issues that way. Any idea how to fix this?