-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't upload script via MaixPy IDE #1
Comments
Hello, Alex!
The reason you're not seeing a segfault message is that MaixPy IDE console doesn't show C segfault tracebacks. In order to see if it is a segfault you need to:
|
Ok. I got the code to run in the serial port terminal. It looks like there is a memory issue:
|
Update. It loads the model with the Mobilenet5_0 architechture but am still receiving an error message:
I will try to find the solution. I think maybe you already posted the answer here: So I checked the output values before reshape as suggested, see below: Then change the section of code in MaixyPy IDE to
And the output still says:
I notice that the anchors are different on the device script to what I trained. The anchors I used in the config file for training are: So I change the anchors in the device script to see if that fixes the issue as below:
And the script outputs the following:
Do I need to retrain the model with the anchors the same as being run on the device? But get the following error:
Any ideas what I'm doing wrong here? Or suggestions on how to fix? |
Okay, now I understand what is going on here. The best course for you is to train a model with legacy aXeleRate - you can do that by switching to legacy-yolov2 branch in Colab notebook right after cloning the repository. Tell me how that goes! The model trained there should work on MARK. |
Bugger! So you don't expect the PR to ever get merged now? Or is just extensively delayed? I tried running with the legacy repo but it seems like there is still some issue as there are not inference images created after finishing the notebook cells. I think it has something to do with the deprecation warnings. I'm loading the legacy repo like this:
Visualising the dataset works fine when loading this cell:
My training config file looks like this:
The run the training:
And gives the below output:
Is this legacy repo no longer compatible with the Keras training modules/syntax? |
There is some chance it would be upstreamed by Maixpy, but if it is going to make it to MARK firmware you need to try reaching out to Seeed. For Maixpy, leave your comment about upstreaming YOLOv3 in https://github.com/sipeed/MaixPy/pull/451. |
Oh, and about inference images - check your project folder |
Yeah I've checked and it's same thing training for 100 epochs. There's definitely no inference images there. |
Okay, I'll check the issue about inference images. |
The best model model with mAP of 1.0 was achieved at epoch 53 so model was not saved after that. The conversion of the kmodel and tflite format seem to work fine. At least both files are there. I will try the kmodel in the MARK and see if it works anyway. Is the Summary section suppose to look like that? |
Yes it works!! Just not sure how to upload the script to the board so it works without being plugged in via serial port? Can you tell me how to get the device to automatically run the script when turning it on? |
So, the best way to have a script run on reboot is to save it as user.py with MaixPy IDE (Tools -> Transfer file to the board, file should be named user.py). Burn the model directly to flash - theoretically running model from SD card should work, but in practice I am not sure what were the latest code changes.
you can see what the problem is by connecting to the device with Serial Monitor (Tools -> Open Terminal - > New Terminal, default baud rate (115200), the port is specific to your OS and machine) and restarting MARK - it will show the error message on Terminal. |
Great, that works. Thanks for all your help! |
Excellent! I'll close the issue then! |
Looks like something related to upgraded packages in Colab. Create an issue in axelerate repository and I'll have a look if I have time? |
There might be an issue with your browser. |
Okay, it seems GH templates syntax has changed. I fixed it - you can file an issue now. |
I am trying to upload a script that was developed by @AIWintermuteAI and posted here aXeleRate - Keras-Based Framework for AI on the Edge.
But there seems to be some issue where there is not an obvious error message that I can follow.
I have uploaded the latest firmware to the M.A.R.K from the Codecraft web interface and then tried to run the script posted below:
I have trained the kmodel placed it on the SD card with the correct filename and inserted into the CyberEye module.
I am able to connect to the board through MaixPy IDE but when trying to run the script the terminal displays the following before it automatically disconnects the serial port connection:
Nothing is displayed on the lcd screen of the device except a black screen.
FYI as additional information: I have been able to upload other scripts to a seperate Maixduino device using MaixPy IDE. And have had the M.A.R.K kit working with code developed through the Codecraft graphical coding web interface such as the line following example using with the on board camera and object detection algorithm.
Is anyone able to assist in troubleshooting why this script isn't functioning?
The text was updated successfully, but these errors were encountered: