geezacoleman / OpenWeedLocator

An open-source, low-cost, image-based weed detection device for in-crop and fallow scenarios.
MIT License
353 stars 64 forks source link

Bug: `input_file_or_directory` Field in [System] Config Not Taking Effect #158

Open bwx0 opened 6 days ago

bwx0 commented 6 days ago

Description

It seems that OWL is not reading from the video file specified in the input_file_or_directory field under the [System] section of the configuration file.

It looks like this behavior might be due to a missing else statement on line 293 of owl.py.

Steps to Reproduce

  1. Set the input_file_or_directory field e.g. ../videos/example.mp4
  2. Run the OWL script. python owl.py --show-display
  3. Observe that the video file is not being processed as expected. Instead, it is reading from the camera.

Suggested Fix

Add an else: statement on line 293 in owl.py as mentioned above.

geezacoleman commented 4 days ago

Good find! Thanks for working this out - there are a couple of other changes I'm making to make the code more readable/robust/better at catching errors when setting everything up so I should have it updated by early next week.

You can follow the progress on the branch assigned below.