microsoft / CameraTraps

PyTorch Wildlife: a Collaborative Deep Learning Framework for Conservation.
https://cameratraps.readthedocs.io/en/latest/
MIT License
784 stars 246 forks source link

File "path/run_tf_detector.py", line 54, in <module> from ct_utils import truncate_float ModuleNotFoundError: No module named 'ct_utils' #139

Closed Jonathan-Gore closed 4 years ago

Jonathan-Gore commented 4 years ago

Hi, I'm a wildlife researcher who is very new to scripting/command line interfaces, so I'm sorry if this seems simple!

I'm kind of confused, I was trying to run a quick demo of the megadetector_v3 on some camera trap imagery but can't seem to get the run_tf_detector.py script working due to 'ct_utils' in the root folder not being successfully referenced. I've made sure that my working directory is the root file of the git clone (CameraTraps) and I've tried running it in both 'cameratraps' and 'cameratraps-detector' environments. I've tried moving ct_utils into the detector sub-folder and vice-versa with no success.

Any advice on how to get the ct_utils script referenced when running the run_tf_detector.py script?

I'm following the directions found on: https://github.com/microsoft/CameraTraps/blob/master/megadetector.md

Thanks!

agentmorris commented 4 years ago

Sorry, this script used to stand on its own; now it depends on other modules in our repo, and we forgot to update the instructions. I've added instructions for making sure that our utilities repo is checked out and on your Python path:

https://github.com/microsoft/CameraTraps/blob/master/megadetector.md#0-prerequisites

Let us know if that works!

Jonathan-Gore commented 4 years ago

Thank you for explaining, got my first couple test rounds done! Issue closed!

agentmorris commented 4 years ago

Glad to hear it. We're always interested in hearing about how folks are using our tools, so if you get a chance, drop us an email at cameratraps@microsoft.com to tell us how you're using MegaDetector and whether it's working for you. Thanks!